Gets information about a node.
The path to get information for.
Information about the node.
Reads all nodes that match a pattern.
The pattern string to match against or a list of patterns to match.
Optionaloptions: IZFileSystemSearchOptionsThe options for the search.
A list of path strings that match the given patterns.
Walks up a directory tree to search for existence of a given path.
The path to search for. This is the candidate folder path that may or may not exist somewhere from the start directory all the way up the directory tree.
Optionaloptions: IZFileSystemWalkOptionsThe given options for the search.
The fully qualified path to the first path that matches the search starting at the options start or the current working directory if not specified. Returns null if no such directory exists.
import { resolve } from 'path'
// Find any folder named .vscode from the current working directory all the way
// up the directory tree. Returns null if no vscode directory can be found.
const service = new ZFileSystemService();
const vscode = service.walk('.vscode');
// Walk the directory tree from the current script and find the .config folder.
const config = service.walk('.config', { start: __dirname });
// Walk the directory tree from the current script and stop when we reach
// at most 2 directories up.
const start = __dirname;
const stop = resolve(__dirname, '../..');
const file = service.walk('path/to/file.json', { start, stop });
Represents a service to enumerate the file system.