add Export feature for package gres

This commit is contained in:
John Guo
2021-12-14 23:01:20 +08:00
parent 4c7e409e61
commit bc2ce19876
3 changed files with 53 additions and 3 deletions

View File

@ -77,6 +77,11 @@ func ScanDirFile(path string, pattern string, recursive ...bool) []*File {
return defaultResource.ScanDirFile(path, pattern, recursive...)
}
// Export exports and saves specified path `src` and all its sub files to specified system path `dst` recursively.
func Export(src, dst string) error {
return defaultResource.Export(src, dst)
}
// Dump prints the files of the default resource object.
func Dump() {
defaultResource.Dump()