Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotDirectory = errors.New("not directory")
ErrNotDirectory is returned when the path is not a directory.
var ErrNotRegularFile = errors.New("not regular file")
ErrNotRegularFile is returned when the file is not an regular file.
Functions ¶
func CopyDirToDir ¶ added in v1.1.0
CopyDirToDir copies contents in src dir to dst dir. Only regular files are copied. Existing files will be overwritten.
func CopyToDir ¶ added in v1.1.0
CopyToDir copies the src file to dst dir. All parent directories are created with permissions 0755.
Source file's read and execute permissions are preserved for everyone. Write permission is preserved for owner. Group and others cannot write. Existing file will be overwritten.
func IsValidFileName ¶
IsValidFileName checks if a file name is cross-platform compatible
func TrimFileExtension ¶ added in v1.1.0
TrimFileExtension returns the file name without extension.
For example,
when input is xyz.exe, output is xyz
when input is xyz.tar.gz, output is xyz.tar
Types ¶
This section is empty.