Documentation
¶
Index ¶
- func CheckAllExists(ctx context.Context, pathsToCheck []string) error
- func CheckExists(ctx context.Context, pathToCheck string) error
- func Chmod(ctx context.Context, path string, options *filesoptions.ChmodOptions) error
- func Contains(ctx context.Context, filePath string, searchString string) (bool, error)
- func Copy(ctx context.Context, src string, dst string, options *filesoptions.CopyOptions) error
- func Create(ctx context.Context, path string) error
- func CreateDirectory(ctx context.Context, path string, options *filesoptions.CreateOptions) 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 Move(ctx context.Context, src string, dst string, options *filesoptions.MoveOptions) error
- func ReadAsBytes(ctx context.Context, pathToRead string) ([]byte, error)
- func ReadAsString(ctx context.Context, pathToRead string, options *filesoptions.ReadOptions) (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 CheckAllExists ¶ added in v0.450.0
func CheckExists ¶ added in v0.450.0
func Chmod ¶ added in v0.440.0
func Chmod(ctx context.Context, path string, options *filesoptions.ChmodOptions) error
func Copy ¶ added in v0.486.0
func Copy(ctx context.Context, src string, dst string, options *filesoptions.CopyOptions) error
func CreateDirectory ¶ added in v0.416.0
func CreateDirectory(ctx context.Context, path string, options *filesoptions.CreateOptions) error
func CreateSymlink ¶ added in v0.447.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.447.0
func IsSymlinkToDirectory ¶ added in v0.447.0
func ListFiles ¶ added in v0.442.0
func ListFiles(ctx context.Context, path string, listOptions *parameteroptions.ListFileOptions) ([]string, error)
func Move ¶ added in v0.486.0
func Move(ctx context.Context, src string, dst string, options *filesoptions.MoveOptions) error
Move the file 'src' to 'dst'.
If a simple os.Rename fails the file is moved by copy it first and then delete it. So this function works even when src and dest are not on the same filesystem.
func ReadAsBytes ¶ added in v0.408.0
func ReadAsString ¶
func ReadAsString(ctx context.Context, pathToRead string, options *filesoptions.ReadOptions) (string, error)
func ResolveSymlink ¶ added in v0.447.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.