Documentation
¶
Index ¶
- func CleanSlashPath(path string) string
- func CopyFile(src, dst string) error
- func Dir(path string) string
- func Exists(path string) (bool, error)
- func GenCSVBooknamePattern(dir, bookName string) string
- func HasSubdirPrefix(path string, subdirs []string) bool
- func IsSamePath(leftPath, rightPath string) bool
- func Join(elem ...string) string
- func ParseCSVBooknamePatternFrom(filename string) (string, error)
- func ParseCSVFilenamePattern(filename string) (bookName, sheetName string, err error)
- func RangeFilesByFormat(dir string, fmt format.Format, callback func(bookPath string) error) error
- func Rel(basepath string, targetpath string) (string, error)
- func RewriteSubdir(path string, subdirRewrites map[string]string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanSlashPath ¶ added in v0.11.0
CleanSlashPath returns clean and slash path.
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fails, copy the file contents from src to dst.
func Dir ¶ added in v0.11.0
Dir returns all but the last element of path, typically the path's directory. The result is a clean and slash path.
func GenCSVBooknamePattern ¶ added in v0.10.7
func HasSubdirPrefix ¶ added in v0.11.0
HasSubdirPrefix returns whether the given path has the given prefix.
func IsSamePath ¶ added in v0.9.13
IsSamePath checks if two paths are same based on clean slash path.
func ParseCSVBooknamePatternFrom ¶ added in v0.10.7
func ParseCSVFilenamePattern ¶ added in v0.10.7
func RangeFilesByFormat ¶ added in v0.10.7
RangeFilesByFormat traveses the given directory with the given format, and invoke the given callback for each file.
Types ¶
This section is empty.