Create a new FileSystem instance
The current working directory URL or string path
Parsed TypeScript configuration
AdonisJS RC file configuration
Inspect a file path to determine its type and properties within the project.
This method analyzes a file to categorize it as a script file, test file, or meta file, and determines whether changes to the file should trigger server restarts. Results are memoized for performance optimization.
File inspection result or null if the file should be ignored
Determines if a directory should be watched by the file watcher.
This method checks if a directory should be monitored for file changes based on the TypeScript configuration includes/excludes patterns. Results are memoized for performance. Chokidar sends absolute Unix paths.
Note: Use shouldWatchFile for files and this method for directories only.
True if the directory should be watched
Includes glob patterns extracted from "tsconfig.json" file. Defaults to: ["**/*"]
Excludes glob patterns extracted from "tsconfig.json" file.
Defaults to: [ 'node_modules/', 'bower_components/', 'jspm_packages/**, ]
Following patterns are always ignored
'.git/', 'coverage/', '.github/**'
Returns true if the file should be watched. Chokidar sends absolute unix paths to the ignored callback.
You must use "shouldWatchDirectory" method for directories and call this method for files only.
The absolute path to the file
True if the file should be watched
Exposes an intutive API to run actions when different kind of files are changed. The FileSystem is built around the vocabulary used by AdonisJS. Which includes:
Using FileSystem you can register actions to be executed when a file changes in one of the above categories.
Example