Documentation
¶
Index ¶
- func Chmod(ctx context.Context, path string, options *filesoptions.ChmodOptions) error
- func Contains(ctx context.Context, filePath string, searchString string) (bool, error)
- func Create(ctx context.Context, path string) error
- func CreateDirectory(ctx context.Context, path string) error
- func CreateSymlink(ctx context.Context, target string, symlink string) error
- func Delete(ctx context.Context, pathToDelete string, options *filesoptions.DeleteOptions) error
- func Exists(ctx context.Context, pathToCheck string) bool
- func GetAccessPermissions(path string) (int, error)
- func GetAccessPermissionsString(path string) (string, error)
- func IsDir(ctx context.Context, pathToCheck string) bool
- func IsFile(ctx context.Context, pathToCheck string) bool
- func IsSymlink(ctx context.Context, pathToCheck string) (bool, error)
- func IsSymlinkTo(ctx context.Context, symlink string, target string) (bool, error)
- func IsSymlinkToDirectory(ctx context.Context, pathToCheck string) (bool, error)
- func ListFiles(ctx context.Context, path string, ...) ([]string, error)
- func ReadAsBytes(ctx context.Context, pathToRead string) ([]byte, error)
- func ReadAsString(ctx context.Context, pathToRead string) (string, error)
- func ResolveSymlink(ctx context.Context, symlink string) (string, error)
- func SecureDelete(ctx context.Context, path string) error
- func WriteBytes(ctx context.Context, pathToWrite string, content []byte) error
- func WriteString(ctx context.Context, pathToWrite string, content string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chmod ¶ added in v0.440.0
func Chmod(ctx context.Context, path string, options *filesoptions.ChmodOptions) error
func CreateDirectory ¶ added in v0.418.0
func CreateSymlink ¶ added in v0.448.0
func Delete ¶
func Delete(ctx context.Context, pathToDelete string, options *filesoptions.DeleteOptions) error
Delete a file or directory. Directories are deleted recursively.
func GetAccessPermissions ¶ added in v0.440.0
func GetAccessPermissionsString ¶ added in v0.440.0
func IsSymlinkTo ¶ added in v0.448.0
func IsSymlinkToDirectory ¶ added in v0.448.0
func ListFiles ¶ added in v0.442.0
func ListFiles(ctx context.Context, path string, listOptions *parameteroptions.ListFileOptions) ([]string, error)
func ReadAsBytes ¶ added in v0.408.0
func ResolveSymlink ¶ added in v0.448.0
func SecureDelete ¶
Overwrite the file before deleting it to prevent data restore. Like 'shred' on linux systems.
func WriteBytes ¶ added in v0.408.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.