Documentation
¶
Index ¶
- func CopyDirShallow(src string, dest string) error
- func CopyFile(src string, dest string) error
- func FindFilesWithExtension(dir string, ext ...string) []string
- func GenerateFilePathAdjacentToFile(sourceFilePath string, suffix string, forceOverwrite bool) string
- func GenerateTempFilePattern(localPath string) string
- func ListFiles(dir string, includeHidden bool) ([]string, error)
- func MoveFile(src, dest string) error
- func MustNotExist(destFilePath string, forceOverwrite bool)
- func ReadFile(filePath string) (*[]byte, error)
- func WatchDir(dir string) (updatedC chan bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyDirShallow ¶
func FindFilesWithExtension ¶
func GenerateFilePathAdjacentToFile ¶
func GenerateFilePathAdjacentToFile(sourceFilePath string, suffix string, forceOverwrite bool) string
GenerateFilePathAdjacentToFile creates a filename based on the sourceFilePath, first by removing the extension and then adding the given suffix. The full path is returned.
func GenerateTempFilePattern ¶
GenerateTempFilePattern creates a temporary file pattern based on the provided localPath. It prefixes the extension with a star (*) to ensure uniqueness, as per the os.CreateTemp documentation.
func MoveFile ¶
MoveFile moves a file from src to dest, falling back to copy+delete if os.Rename fails (e.g. across filesystem boundaries).
func MustNotExist ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.