filesystem

package
v0.0.0-...-57e549e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendStringToFile

func AppendStringToFile(filePath, input string)

func ChangeFilePermission

func ChangeFilePermission(filePath string, permission int)

func ChangeOwnership

func ChangeOwnership(path, username string, sudo bool)

func Copy

func Copy(sourcePath, destPath string, sudo bool) error

func CreateDir

func CreateDir(dirPath string, sudo bool) error

func CreateEmptyDir

func CreateEmptyDir(filePath string)

func CreateEmptyFile

func CreateEmptyFile(filePath string)

func Delete

func Delete(path string, sudo bool)

func DirIsEmpty

func DirIsEmpty(path string) bool

func Exists

func Exists(filePath string) bool

func Explorer

func Explorer(objectType, path string, search, exclude []string) []string

func FileContainsString

func FileContainsString(filePath, str string) bool

func FileContentEmpty

func FileContentEmpty(filePath string) bool

func FileToBytes

func FileToBytes(filePath string) []byte

func FileToString

func FileToString(filePath string) string

func GetAbsolutePathToFile

func GetAbsolutePathToFile(filePath string) string

func GetDirPathFromFilePath

func GetDirPathFromFilePath(filePath string) string

func GetFileMode

func GetFileMode() os.FileMode

func GetFileNameFromDirPath

func GetFileNameFromDirPath(dirPath string) string

func GetLastFolderFromPath

func GetLastFolderFromPath(filePath string) string

func GetSize

func GetSize(path, unit string) float64

func GetUserHomeDir

func GetUserHomeDir() string

func GetWorkingDir

func GetWorkingDir(folderOnly bool) string

func GetWorkspaceFolderVar

func GetWorkspaceFolderVar() string

func GiveProgramPermissions

func GiveProgramPermissions(path, user string)

func Move

func Move(sourcePath, destPath string, sudo bool)

func RemoveFile

func RemoveFile(filePath string)

func RenameFile

func RenameFile(filePathOld string, filePathNew string)

func SaveByteArrayToFile

func SaveByteArrayToFile(byteArray []byte, filePath string) error

func StreamToBytes

func StreamToBytes(stream io.Reader) []byte

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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