@push.rocks/smartfile
Version:
Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.
27 lines (26 loc) • 934 B
TypeScript
import { SmartFile } from './classes.smartfile.js';
import type { StreamFile } from './classes.streamfile.js';
/**
* converts file to Object
* @param fileStringArg
* @param fileTypeArg
* @returns {any|any}
*/
export declare let toObject: (fileStringArg: string, fileTypeArg: string) => any;
export interface IToFsOptions {
respectRelative?: boolean;
}
/**
* writes string or Smartfile to disk.
* @param fileArg
* @param fileNameArg
* @param fileBaseArg
*/
export declare let toFs: (fileContentArg: string | Buffer | SmartFile | StreamFile, filePathArg: string, optionsArg?: IToFsOptions) => Promise<unknown>;
/**
* writes a string or a Smartfile to disk synchronously, only supports string
* @param fileArg
* @param filePathArg
*/
export declare const toFsSync: (fileArg: string, filePathArg: string) => void;
export declare let smartfileArrayToFs: (smartfileArrayArg: SmartFile[], dirArg: string) => Promise<void>;