Directory name or path to the directory that should be added.
Optionaloptions: DirectoryAddOptionsAdds 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.
Directory name or path to the directory that should be added.
Optionaloptions: DirectoryAddOptionsOptions.
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.
Relative file path to add.
Adds an existing source file, relative to this directory, or returns undefined.
Will return the source file if it was already added.
Relative file path to add.
Add source files based on file globs.
File glob or globs to add files based on.
The matched source files.
Copies the directory to a new directory.
The relative or absolute path to the new directory.
Optionaloptions: DirectoryCopyOptionsOptions.
The directory the copy was made to.
Immediately copies the directory to the specified path asynchronously.
Directory path as an absolute or relative path.
Optionaloptions: DirectoryCopyOptionsOptions for moving the directory.
Immediately copies the directory to the specified path synchronously.
Directory path as an absolute or relative path.
Optionaloptions: DirectoryCopyOptionsOptions for moving the directory.
Copies the directory to a subdirectory of the specified directory.
Directory path or directory object to copy the directory to.
Optionaloptions: DirectoryCopyOptionsOptions for copying.
The new copied directory.
Creates a directory if it doesn't exist.
Relative or absolute path to the directory that should be created.
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.
Relative file path of the source file to create.
OptionalsourceFileText: string | WriterFunction | OptionalKind<SourceFileStructure>Text, structure, or writer function to create the source file text with.
Optionaloptions: SourceFileCreateOptionsOptions.
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.
Optionaloptions: { declarationDir?: string; emitOnlyDtsFiles?: boolean; outDir?: string }Options for emitting.
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.
Optionaloptions: { declarationDir?: string; emitOnlyDtsFiles?: boolean; outDir?: string }Options for emitting.
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.
Relative path from this directory or absolute path.
Gets a child directory with the specified path or throws if not found.
Relative path from this directory or absolute path.
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.
Optionalmessage: string | (() => string)Gets the path to the directory.
Gets the project.
Gets the relative path to the specified source file as a module specifier.
Source file.
Gets the relative path to the specified directory as a module specifier.
Directory.
Gets the relative path to the specified path.
The file or directory path.
Gets the relative path to another source file.
Source file.
Gets the relative path to another directory.
Directory.
Gets a child source file with the specified path or undefined if not found.
Relative or absolute path to the file.
Gets a child source file by the specified condition or undefined if not found.
Condition to check the source file with.
Gets a child source file with the specified path or throws if not found.
Relative or absolute path to the file.
Gets a child source file by the specified condition or throws if not found.
Condition to check the source file with.
Gets the source files within this directory.
Gets all the source files added to the project relative to the directory that match a pattern.
Glob pattern for filtering out the source files.
Gets all the source files added to the project relative to the directory that match the provided patterns.
Glob patterns for filtering out the source files.
Checks if this directory is an ancestor of the provided directory.
Directory or source file that's a possible descendant.
Checks if this directory is a descendant of the provided directory.
Directory or source file that's a possible ancestor.
Moves the directory to a new path.
Directory path as an absolute or relative path.
Optionaloptions: DirectoryMoveOptionsOptions for moving the directory.
Immediately moves the directory to a new path asynchronously.
Directory path as an absolute or relative path.
Optionaloptions: DirectoryMoveOptionsOptions for moving the directory.
Immediately moves the directory to a new path synchronously.
Directory path as an absolute or relative path.
Optionaloptions: DirectoryMoveOptionsOptions for moving the directory.
Moves the directory to a subdirectory of the specified directory.
Directory path or directory object to move the directory to.
Optionaloptions: DirectoryMoveOptionsOptions for moving.
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.
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.