spectacular-dashboard / fileOperations
Module: fileOperations
Table of contents
Interfaces
Functions
Functions
buildFileTree
▸ buildFileTree(rootPath): Promise<FileNode[]>
Builds a hierarchical file tree from a root directory Filters to only include markdown files and directories
Parameters
| Name | Type |
|---|---|
rootPath | string |
Returns
Promise<FileNode[]>
Defined in
getFileStat
▸ getFileStat(filePath): Promise<vscode.FileStat>
Gets file stats
Parameters
| Name | Type |
|---|---|
filePath | string |
Returns
Promise<vscode.FileStat>
Defined in
getRelativePath
▸ getRelativePath(filePath, rootPath): string
Gets the relative path from root to a file
Parameters
| Name | Type |
|---|---|
filePath | string |
rootPath | string |
Returns
string
Defined in
normalizePath
▸ normalizePath(filePath): string
Normalizes a file path (converts backslashes to forward slashes)
Parameters
| Name | Type |
|---|---|
filePath | string |
Returns
string
Defined in
readFileContent
▸ readFileContent(filePath): Promise<string>
Reads the content of a file
Parameters
| Name | Type |
|---|---|
filePath | string |
Returns
Promise<string>