We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Dir.glob
1 parent 6caea6a commit 675c68cCopy full SHA for 675c68c
1 file changed
src/dir/glob.cr
@@ -37,6 +37,10 @@ class Dir
37
38
# Returns an array of all files that match against any of *patterns*.
39
#
40
+ # ```
41
+ # Dir.glob "path/to/folder/*.txt" # Returns all files in the target folder that end in ".txt".
42
+ # Dir.glob "path/to/folder/**/*" # Returns all files in the target folder and its subfolders.
43
44
# The pattern syntax is similar to shell filename globbing, see `File.match?` for details.
45
46
# NOTE: Path separator in patterns needs to be always `/`. The returned file names use system-specific path separators.
0 commit comments