Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Apr 11, 2023
1 parent 7a8bbeb commit 4229674
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/assetfs/layered.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ func (l *LayeredFS) ReadLayeredFile(elems ...string) ([]byte, string, error) {
// * omitted: all files and directories will be returned.
// * true: only files will be returned.
// * false: only directories will be returned.
// The returned files are sorted by name.
func (l *LayeredFS) ListFiles(name string, fileMode ...bool) ([]string, error) {
fileMap := map[string]bool{}
for _, layer := range l.layers {
Expand Down Expand Up @@ -143,11 +144,12 @@ func (l *LayeredFS) ListFiles(name string, fileMode ...bool) ([]string, error) {
return files, nil
}

// ListAllFiles returns files/directories in the given directory, including subdirectories, recursively.
// ListAllFiles returns files/directories in the given directory, including subdirectories, recursively.
// The fileMode controls the returned files:
// * omitted: all files and directories will be returned.
// * true: only files will be returned.
// * false: only directories will be returned.
// The returned files are sorted by name.
func (l *LayeredFS) ListAllFiles(name string, fileMode ...bool) ([]string, error) {
return listAllFiles(l.layers, name, fileMode...)
}
Expand Down

0 comments on commit 4229674

Please sign in to comment.