filesystem

package
v0.0.0-...-c4caace Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(path string) bool

FileExists returns true if a file exists and is accessible, false otherwise

func ReadLines

func ReadLines(filename string) ([]string, error)

ReadLines reads a file line by line

Types

type Disk

type Disk struct{}

Disk gets information about the disk

func NewDisk

func NewDisk() Disk

NewDisk creates a new instance of Disk

func (Disk) GetUsage

func (Disk) GetUsage(path string) (*DiskUsage, error)

GetUsage gets the disk usage

type DiskUsage

type DiskUsage struct {
	Total     uint64
	Available uint64
}

DiskUsage is the disk usage

type Permission

type Permission struct{}

Permission handles permissions for Unix and Windows

func NewPermission

func NewPermission() (*Permission, error)

NewPermission creates a new instance of `Permission`

func (*Permission) RestrictAccessToUser

func (p *Permission) RestrictAccessToUser(path string) error

RestrictAccessToUser restricts the access to the user (chmod 700)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL