fs
Variable: fs
const fs: {
createFile: (fileName: string, source: string, filePath: string) => Promise<CreateFileResponse>;
createFolder: (folderName: string, folderPath: string) => Promise<CreateFolderResponse>;
deleteFile: (filename: string, filePath: string) => Promise<DeleteFileResponse>;
deleteFolder: (foldername: string, folderpath: string) => Promise<DeleteFolderResponse>;
editFileWithDiff: (targetFile: string, codeEdit: string, diffIdentifier: string, prompt: string, applyModel?: string) => Promise<EditFileAndApplyDiffResponse>;
fileSearch: (query: string) => Promise<FileSearchResponse>;
grepSearch: (path: string, query: string, includePattern?: string, excludePattern?: string, caseSensitive: boolean) => Promise<GrepSearchResponse>;
listCodeDefinitionNames: (path: string) => Promise<ListCodeDefinitionsResponse>;
listDirectory: (params: {
detailed?: boolean;
ignore?: string[];
limit?: number;
notifyUser?: boolean;
path: string;
show_hidden?: boolean;
}) => Promise<ListDirectoryResponse>;
listFile: (folderPath: string, isRecursive: boolean) => Promise<FileListResponse>;
readFile: (filePath: string) => Promise<ReadFileResponse>;
readManyFiles: (params: {
exclude?: string[];
include?: string[];
include_metadata?: boolean;
max_files?: number;
max_total_size?: number;
notifyUser?: boolean;
paths: string[];
recursive?: boolean;
separator_format?: string;
use_default_excludes?: boolean;
}) => Promise<ReadManyFilesResponse>;
searchFiles: (path: string, regex: string, filePattern: string) => Promise<SearchFilesResponse>;
updateFile: (filename: string, filePath: string, newContent: string) => Promise<UpdateFileResponse>;
writeToFile: (relPath: string, newContent: string) => Promise<any>;
};
Defined in: packages/codeboltjs/src/modules/fs.ts:12