Documentation
¶
Overview ¶
Package fsio provides so file system helper functions and types
Index ¶
- func Chdir(dir string) error
- func CreateFileDirectory(filename string, dirMode os.FileMode) error
- func ExpandFilePath(path string) (string, error)
- func MakeAbsFromRelativeToFile(path, relFile string) (string, error)
- func ReadFileFromPath(filename string) ([]byte, error)
- func WriteFileToPath(filename string, buf []byte, modes FileModes) error
- type FileModes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chdir ¶ added in v0.6.0
Chdir changes the current working directory to the named directory. Directory paths starting with ~ will be expanded relative to the home folder.
func CreateFileDirectory ¶
CreateFileDirectory creates a file's parent directories as necessary.
func ExpandFilePath ¶
ExpandFilePath expadas a file path to an absolute path. This function handles home directory '~' specifications.
func MakeAbsFromRelativeToFile ¶
MakeAbsFromRelativeToFile makes path into an absolute path, using relfile as sibling file location to the relative base of the path.
func ReadFileFromPath ¶
ReadFileFromPath expands the directory path and then reads the file specified.
Types ¶
Click to show internal directories.
Click to hide internal directories.