Simple Folder Access

Jaxer provides a number of simple methods for easy access to folders on the filesystem. This section provides an overview of those methods.

Checking if a folder exists

We can check if a folder exists by using the Jaxer.Dir.exists() method. This returns a boolean value predicated on whether the provided folder path exists on the filesystem.

Finding files that match a pattern

We can use the Jaxer.Dir.grep() method to get a list of file objects that matched a provided pattern:

The above example would return an array containing all the html files contained in the current folder. Navigating the filesystem contains a more in depth review of this functionality.