View Source on Github
Attributes
classes
Get a recursive list of all classes in files container.
dirpath
str
exports
Get a recursive list of all exports in files container.
file_names
list[str]
functions
Get a recursive list of all functions in files container.
global_vars
Get a recursive list of all global variables in files container.
import_statements
Get a recursive list of all import statements in files container.
imports
Get a recursive list of all imports in files container.
item_names
list[str]
name
str
parent
Directory | None
Get the parent directory of the current directory.path
Path
symbols
Get a recursive list of all symbols in files container.
tree
Get a recursive list of all files and subdirectories in the directory.
Methods
files
Gets a list of all top level files in the directory.View Source on Github
Returns
list[TFile]
get_class
Get a class by name in files container.View Source on Github
Returns
Class | None
get_export
Get an export by name in files container (supports only typescript).View Source on Github
Returns
TSExport | None
get_file
Get a file by its name relative to the directory.View Source on Github
Returns
TFile | None
get_function
Get a function by name in files container.View Source on Github
Returns
Function | None
get_global_var
Get a global variable by name in files container.View Source on Github
Returns
Assignment | None
get_import
Get an import by name in files container.View Source on Github
Returns
Import | None
get_import_statement
Get an import statement by name in files container.View Source on Github
Returns
ImportStatement | None
get_subdirectory
Get a subdirectory by its name (relative to the directory).View Source on Github
Returns
Directory | None
get_symbol
Get a symbol by name in files container.View Source on Github
Returns
Symbol | None
items
Get a list of all files and subdirectories in the directory.View Source on Github
Returns
A sorted list of files and subdirectories in the directory.
remove
Remove all the files in the files container.View Source on Github
Returns
None
rename
Rename the directory.View Source on Github
Returns
None
subdirectories
Get a list of all top level subdirectories in the directory.View Source on Github
Returns
A sorted list of subdirectories in the directory.
update_filepath
Update the filepath of the directory and its contained files.View Source on Github
Returns
None