Documentation
¶
Index ¶
- func CopyFile(src, dst string) error
- func Exists(path string) bool
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsFilenameAcceptable(fileName, extension string) (bool, error)
- func ReadFile(path string) ([]byte, error)
- func ResetDir(path string) error
- func WriteFile(path string, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFile ¶
CopyFile copies a file from src to dst. It validates both paths, ensures the source exists and is readable, creates parent directories if needed, and verifies write permissions.
func IsFilenameAcceptable ¶ added in v1.1.0
* Check for Empty filename * Check for correctness of file name for provided extension
func ReadFile ¶
ReadFile reads the entire file and returns its contents. It validates the path and checks if the file exists and is readable.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.