Skip to content

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

NameType
rootPathstring

Returns

Promise<FileNode[]>

Defined in

src/fileOperations.ts:17


getFileStat

getFileStat(filePath): Promise<vscode.FileStat>

Gets file stats

Parameters

NameType
filePathstring

Returns

Promise<vscode.FileStat>

Defined in

src/fileOperations.ts:122


getRelativePath

getRelativePath(filePath, rootPath): string

Gets the relative path from root to a file

Parameters

NameType
filePathstring
rootPathstring

Returns

string

Defined in

src/fileOperations.ts:137


normalizePath

normalizePath(filePath): string

Normalizes a file path (converts backslashes to forward slashes)

Parameters

NameType
filePathstring

Returns

string

Defined in

src/fileOperations.ts:130


readFileContent

readFileContent(filePath): Promise<string>

Reads the content of a file

Parameters

NameType
filePathstring

Returns

Promise<string>

Defined in

src/fileOperations.ts:113

Released under the MIT License.