filesystem

package
v0.0.2-0...-4ce78c8 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0, Apache-2.0 Imports: 2 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

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