axiodb
Version:
A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern application. Supports schemas, encryption, and advanced query capabilities.
45 lines (44 loc) • 1.69 kB
TypeScript
import { ErrorInterface, SuccessInterface } from "../../config/Interfaces/Helper/response.helper.interface";
export default class FolderManager {
private readonly fileSystem;
private readonly fileSystemSync;
private readonly responseHelper;
private readonly WorkerProcess;
constructor();
/**
* Creates a new directory at the specified path.
*/
CreateDirectory(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Deletes a directory at the specified path.
*/
DeleteDirectory(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Checks if a directory exists at the specified path.
*/
DirectoryExists(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Lists the contents of a directory at the specified path.
*/
ListDirectory(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Moves a directory from the old path to the new path.
*/
MoveDirectory(oldPath: string, newPath: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Locks a directory at the specified path.
*/
LockDirectory(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Unlocks a directory at the specified path.
*/
UnlockDirectory(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* Checks if a directory is locked at the specified path.
*/
IsDirectoryLocked(path: string): Promise<SuccessInterface | ErrorInterface>;
/**
* get the size of a directory at the specified path.
*/
GetDirectorySize(path: string): Promise<SuccessInterface | ErrorInterface>;
}