Documentation ¶
Index ¶
- func CopyDir(src string, dst string) (err error)
- func CopyDirExtended(src string, dst string, ignore []string) (err error)
- func CopyFile(source string, target string) error
- func DeleteFile(filename string) error
- func DirExists(path string) bool
- func DirIsEmpty(dir string) (bool, error)
- func FileExists(path string) bool
- func FindFileInParents(path string, filename string) string
- func FindPathToFile(fsys fs.FS, file string) (string, error)
- func GetSubdirectories(rootDir string) (*slicer.StringSlicer, error)
- func MD5File(filename string) (string, error)
- func MkDirs(fullPath string, mode ...os.FileMode) error
- func Mkdir(dirname string) error
- func MoveFile(source string, target string) error
- func MustLoadString(filename string) string
- func MustMD5File(filename string) string
- func MustWriteString(filename string, data string)
- func RelativePath(relativepath string, optionalpaths ...string) string
- func RelativeToCwd(relativePath string) (string, error)
- func SetPermissions(dir string, perm os.FileMode) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDir ¶
CopyDir recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. Symlinks are ignored and skipped. Credit: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
func CopyDirExtended ¶
CopyDirExtended recursively copies a directory tree, attempting to preserve permissions. Source directory must exist, destination directory must *not* exist. It ignores any files or directories that are given through the ignore parameter. Symlinks are ignored and skipped. Credit: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04
func DirExists ¶
DirExists - Returns true if the given path resolves to a directory on the filesystem
func DirIsEmpty ¶
func FileExists ¶
FileExists returns a boolean value indicating whether the given file exists
func FindFileInParents ¶
FindFileInParents searches for a file in the current directory and all parent directories. Returns the absolute path to the file if found, otherwise an empty string
func GetSubdirectories ¶
func GetSubdirectories(rootDir string) (*slicer.StringSlicer, error)
GetSubdirectories returns a list of subdirectories for the given root directory
func MoveFile ¶
MoveFile attempts to move the source file to the target Target is a fully qualified path to a file *name*, not a directory
func MustLoadString ¶
MustLoadString attempts to load a string and will abort with a fatal message if something goes wrong
func MustMD5File ¶
MustMD5File will call MD5File and abort the program on error
func MustWriteString ¶
MustWriteString will attempt to write the given data to the given filename It will abort the program in the event of a failure
func RelativePath ¶
RelativePath returns a qualified path created by joining the directory of the calling file and the given relative path.
Example: RelativePath("..") in *this* file would give you '/path/to/wails2/v2/internal`
func RelativeToCwd ¶
RelativeToCwd returns an absolute path based on the cwd and the given relative path
Types ¶
This section is empty.