Iterate over directory
Crystal
Similar to ruby Dir.
Work with pattern scan, but currently ** not supported ⚠recursive issue
Ruby / SO
see also
- How to list directory contents including dotfiles but not . and ..?
- Paths in Ruby - for path manipulation, eg:
File.expand_path( File.join( File.dirname(__FILE__), '../other' ))
orFile.expand_path('../other', __FILE__)
C++ (x17)
for g++ version < 9.0 link with -lstdc++fs
see undefined reference when using experimental/filesystem
see also
- std::filesystem::is_directory - example of checking different filetype. There are 2 kind of api: one trigger exception, the other return an error code.
Written on August 14, 2020, Last update on June 8, 2024
loop
iterate
filesystem
file
ruby
crystal
c++