diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-02-23 14:49:45 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-02-23 17:21:37 -0800 |
commit | b6c90239d601e7903028e0561ba601bc55fcfcbe (patch) | |
tree | 00b657549ffc465ec8f5dc1502a4ca06778a85eb /singleton_ctx.go | |
parent | cd3b7aed33c64925b4771e9c6ed160b4e1042c61 (diff) | |
download | android_build_blueprint-b6c90239d601e7903028e0561ba601bc55fcfcbe.tar.gz android_build_blueprint-b6c90239d601e7903028e0561ba601bc55fcfcbe.tar.bz2 android_build_blueprint-b6c90239d601e7903028e0561ba601bc55fcfcbe.zip |
Append / to directories in Glob results
This makes it easy for users of Glob to detect whether the match is a
file or directory. Doing the check at this level means that the filelist
file used as a dependency will be updated if a directory is replaced
with a file of the same name, or vice versa.
Change-Id: I79ebba39327218bcdcf50b393498306119de9d6c
Diffstat (limited to 'singleton_ctx.go')
-rw-r--r-- | singleton_ctx.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/singleton_ctx.go b/singleton_ctx.go index 28fecf0..bbfce00 100644 --- a/singleton_ctx.go +++ b/singleton_ctx.go @@ -65,10 +65,12 @@ type SingletonContext interface { AddNinjaFileDeps(deps ...string) - // GlobWithDeps returns a list of files that match the specified pattern but do not match any - // of the patterns in excludes. It also adds efficient dependencies to rerun the primary - // builder whenever a file matching the pattern as added or removed, without rerunning if a - // file that does not match the pattern is added to a searched directory. + // GlobWithDeps returns a list of files and directories that match the + // specified pattern but do not match any of the patterns in excludes. + // Any directories will have a '/' suffix. It also adds efficient + // dependencies to rerun the primary builder whenever a file matching + // the pattern as added or removed, without rerunning if a file that + // does not match the pattern is added to a searched directory. GlobWithDeps(pattern string, excludes []string) ([]string, error) Fs() pathtools.FileSystem |