Protected constructorConstructs file system with the given root.
The file system has to be initialized after construction.
Use static create method instead to create file system instances.
File system root URL.
URI of the root package.
Dereferences package entry.
Host package which entry to resolve.
Package or its entry import specifier.
Promise resolved to either module URI, or undefined if nothing to dereference.
Searches for package directory containing the given file or URI.
URI of the target file or directory.
Promise resolved to either enclosing package directory, or undefined if not found.
Initializes FS.
This method has to be called prior to start using the FS.
Optional root: stringURL or path of the root directory. Defaults to current working directory.
Promise resolved to this instance.
Tries to load package info from the given directory.
By default, detects package info by the loaded package.json contents.
Source directory.
Promise resolved to either loaded package info contents, or undefined if directory does not contain
valid package.json file.
Recognizes Node.js import specifier and parses it accordingly.
In addition to imports recognized by recognizeImport, this method recognizes Node.js built-ins and Windows/Unix paths.
Import specifier to recognize. May be recognized already.
Recognized import specifier.
Extracts package URI from compatible URI import specifier.
Absolute URI import specifier.
Either package URI, or undefined if the URI can not be used to access packages.
Resolves a package by name against another one.
Note that returned URI is not necessary the one of package directory. Call findPackageDir in order to find one.
Package to resolve another one against.
Package name to resolve.
Promise resolved to either module URI, or undefined if the name can not be resolved.
Resolves path relatively to package.
By default, uses URI resolution.
The base to resolve the path against.
Path or URI to resolve.
URI of the resolved path.
Static createCreates new file system instance.
Optional root: stringURL or path of the root directory. Defaults to current working directory.
Generated using TypeDoc
Node.js-specific implementation of package file system.