import { Directory } from "https://deno.land/x/deno2node@v1.10.0/src/deps.deno.ts";
Methods
Adds an existing directory from the relative path or directory name, or throws if it doesn't exist.
Will return the directory if it was already added.
Adds an existing directory from the relative path or directory name, or returns undefined if it doesn't exist.
Will return the directory if it was already added.
Adds an existing source file, relative to this directory, or throws if it doesn't exist.
Will return the source file if it was already added.
Adds an existing source file, relative to this directory, or returns undefined.
Will return the source file if it was already added.
Add source files based on file globs.
Recreates the directory.
Asynchronously recreates the directory.
Synchronously recreates the directory.
Copies the directory to a new directory.
Immediately copies the directory to the specified path asynchronously.
Immediately copies the directory to the specified path synchronously.
Copies the directory to a subdirectory of the specified directory.
Creates a directory if it doesn't exist.
Creates a source file, relative to this directory.
Note: The file will not be created and saved to the file system until .save() is called on the source file.
Queues a deletion of the directory to the file system.
The directory will be deleted when calling ast.save(). If you wish to delete the file immediately, then use deleteImmediately().
Asyncronously deletes the directory and all its descendants from the file system.
Synchronously deletes the directory and all its descendants from the file system.
Emits the files in the directory.
Emits the files in the directory synchronously.
Remarks: This might be very slow compared to the asynchronous version if there are a lot of files.
Forgets the directory and all its descendants from the Project.
Note: Does not delete the directory from the file system.
Gets the directory path's base name.
Gets the descendant directories.
Gets the source files in the current directory and all the descendant directories.
Gets the child directories.
Gets a directory with the specified path or undefined if not found.
Gets a child directory by the specified condition or undefined if not found.
Gets a child directory with the specified path or throws if not found.
Gets a child directory by the specified condition or throws if not found.
Gets the parent directory if it exists and was added to the project.
Gets the parent directory or throws if it doesn't exist or was never added to the project.
Gets the path to the directory.
Gets the project.
Gets the relative path to the specified file path as a module specifier.
Gets the relative path to the specified source file as a module specifier.
Gets the relative path to the specified directory as a module specifier.
Gets the relative path to the specified path.
Gets the relative path to another source file.
Gets the relative path to another directory.
Gets a child source file with the specified path or undefined if not found.
Gets a child source file by the specified condition or undefined if not found.
Gets a child source file with the specified path or throws if not found.
Gets a child source file by the specified condition or throws if not found.
Gets the source files within this directory.
Gets all the source files added to the project relative to the directory that match a pattern.
Gets all the source files added to the project relative to the directory that match the provided patterns.
Checks if this directory is an ancestor of the provided directory.
Checks if this directory is a descendant of the provided directory.
Moves the directory to a new path.
Immediately moves the directory to a new path asynchronously.
Immediately moves the directory to a new path synchronously.
Moves the directory to a subdirectory of the specified directory.
Asynchronously saves the directory and all the unsaved source files to the disk.
Synchronously saves the directory and all the unsaved source files to the disk.
Gets if the directory was forgotten.