ucbuilder
Version:
:Shree Ganeshay Namah: new way app design
83 lines (82 loc) • 3.41 kB
TypeScript
import fs from 'fs';
import crypto from "crypto";
import { PreloadFullFill } from '../common/ipc/enumAndMore.js';
export interface I_WriteFileSyncPerameters {
path: string;
data: string;
encode: fs.WriteFileOptions;
}
export interface I_ReadFileSyncPerameters {
path: string;
doCache?: boolean;
encode: fs.WriteFileOptions;
}
export interface I_ExistsSyncPerameters {
path: string;
}
export interface I_PathBaseName {
path: string;
suffix: string;
}
export interface I_PathRelative {
from: string;
to: string;
}
export interface I_ModuleAlice {
alice: string;
path: string;
}
export declare class nodeFn {
static renderer: import("./ipc/IpcRendererHelper.js").IRelativeRendere;
static fullfill: PreloadFullFill;
static onReady(callback: () => void): void;
static crypto: {
toString: (size: number, encoding?: BufferEncoding) => string;
randomBytes: (size: number) => Buffer;
convert: (data: any, from?: crypto.Encoding, to?: crypto.Encoding) => string;
encrypt: (data: any) => string;
decrypt: (data: any) => string;
};
static url: {
fileURLToPath: (path: string) => string;
pathToFileURL: (path: string) => string;
};
static path: {
startsWith: (thisPath: string, startWithThisPath: string) => boolean;
dirname: (path: string) => string;
isAbsolute: (path: string) => boolean;
basename: (path: string, suffix?: string) => string;
relative: (from: string, to: string) => string;
resolve: (...paths: string[]) => string;
resolveFilePath: (fromFilePath: string, toFilePath: string) => string;
relativeFilePath: (fromFilePath: string, path: string) => string;
getPathOnly: (pth: string) => string;
getUrlOnly: (pth: string) => string;
subtractPath: (basePath: string, targetPath: string) => string;
isSamePath: (path1: string, path2: string) => boolean;
join: (...paths: string[]) => string;
normalize: (path: string) => string;
intersectPath: (path1: string, path2: string) => boolean;
intersectAndReplacePath: (basePath: string, targetPath: string) => boolean;
};
private static readFileSyncStorage;
private static readFileSyncStorageCounter;
static fs: {
openSync: (path: fs.PathLike, flags: fs.OpenMode, mode?: fs.Mode | null) => any;
existsSync: (path: string) => boolean;
rename: (from: string, to: string) => any;
rmSync: (path: fs.PathLike, options?: fs.RmOptions) => any;
isDirectory: (path: fs.PathLike, options?: fs.StatSyncOptions) => boolean;
mkdirSync: (path: string, options: fs.MakeDirectoryOptions) => string;
copyFileSync: (fromPath: string, toPath: string, option?: number) => string;
readFile: (path: string, encode?: import("fs").WriteFileOptions) => Promise<any>;
readFileSync: (path: string, encode?: import("fs").WriteFileOptions, doCache?: boolean) => string | null;
readdirSync: (path: string, encode?: import("fs").WriteFileOptions) => string[];
readdirSyncDirent: (path: string, recursive?: boolean) => {
name: string;
isDir: boolean;
isFile: boolean;
}[];
writeFileSync: (path: string, data: string, encode?: import("fs").WriteFileOptions) => any;
};
}