Documentation
¶
Index ¶
- func CheckPermissions(path string, perm Permission) error
- func CopyFileOrDir(src, dst string) error
- func CopyMultiple(sources []string, destDir string) error
- func CreateDir(dir, name string) error
- func CreateFile(dir, name string) error
- func Delete(path string, isDir bool) error
- func DeleteWithUndo(path string, isDir bool) (string, error)
- func FormatError(err error, path string, operation string) error
- func MoveMultiple(sources []string, destDir string) error
- func MoveToTrash(path string) error
- func Rename(oldPath, newName string) error
- func RestoreFromTrash(undoInfoPath, originalPath string) error
- type Permission
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPermissions ¶ added in v1.0.2
func CheckPermissions(path string, perm Permission) error
CheckPermissions validates if the current user has the required permissions
func CopyFileOrDir ¶
CopyFileOrDir copies a file or directory from src to dst
func CopyMultiple ¶
CopyMultiple copies multiple files/directories to a destination directory
func DeleteWithUndo ¶ added in v1.0.2
DeleteWithUndo deletes a file or directory and returns the trash path for undo Returns (trashPath, error)
func FormatError ¶ added in v1.0.2
FormatError formats an error with helpful context and suggestions
func MoveMultiple ¶
MoveMultiple moves multiple files/directories to a destination directory
func MoveToTrash ¶
MoveToTrash moves a file or directory to the system trash/recycle bin
func RestoreFromTrash ¶ added in v1.0.2
RestoreFromTrash attempts to restore a file from trash
Types ¶
type Permission ¶ added in v1.0.2
type Permission int
Permission type for validation
const ( PermRead Permission = iota PermWrite PermExecute )
Click to show internal directories.
Click to hide internal directories.