diff --git a/modules/compiler/src/main/java/script/dsl/ScriptDsl.java b/modules/compiler/src/main/java/script/dsl/ScriptDsl.java index a134cbf..284183a 100644 --- a/modules/compiler/src/main/java/script/dsl/ScriptDsl.java +++ b/modules/compiler/src/main/java/script/dsl/ScriptDsl.java @@ -98,13 +98,14 @@ The directory where a module script is located (equivalent to `projectDir` if us void exit(int exitCode, String message); @Description(""" - Get one or more files from a path or glob pattern. Returns a Path or list of Paths if there are multiple files. + Get a file from a path or glob pattern. Returns a collection if there are zero or multiple files. + + *NOTE: use `files()` to get a collection of files.* """) - /* Path | Collection */ - Object file(Map opts, String filePattern); + Path file(Map opts, String filePattern); @Description(""" - Convenience method for `file()` that always returns a list. + Get a collection of files from a path or glob pattern. """) Collection files(Map opts, String filePattern);