Skip to main content

module util::FileSystem

rascal-0.40.16

Usage

import util::FileSystem;

Dependencies

import IO;

data FileSystem

data FileSystem  
= directory(loc l, set[FileSystem] children)
| file(loc l)
;

function crawl

FileSystem crawl(loc l)

function files

Recursively lists locations of all files from the supplied directory. If input is a file, its location is returned instead.

set[loc] files(loc l)

function find

Recursively lists locations of all files that satisfy the filter criterion filt. For a file to be included, filt must return true for it.

set[loc] find(loc f, bool (loc) filt)

function find

Recursively lists locations of all files that end in ext.

set[loc] find(loc f, str ext)

function visibleFiles

Lists all files recursively ignored files and directories starting with a dot.

set[loc] visibleFiles(loc l)