# CliFs Service

Module
import { CliFs } from "@tsed/cli-core"
Source/packages/cli-core/src/services/CliFs.ts

# Overview

class CliFs {
    raw: typeof Fs;
    exists(path: string): boolean;
    readFile(file: string | Buffer | number, encoding?: any): Promise<string>;
    writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void;
    writeFile(file: string | Buffer | number, data: any, options?: WriteFileOptions | string): void;
    ensureDir(path: string, options?: EnsureOptions | number): Promise<void>;
    ensureDirSync(path: string, options?: EnsureOptions | number): void;
    findUpFile(root: string, file: string): string | undefined;
    importModule(mod: string, root?: string): Promise<any>;
}

# Members

raw: typeof Fs

exists(path: string): boolean

readFile(file: string | Buffer | number, encoding?: any): Promise<string>

writeFileSync(path: PathLike | number, data: any, options?: WriteFileOptions): void

writeFile(file: string | Buffer | number, data: any, options?: WriteFileOptions | string): void

ensureDir(path: string, options?: EnsureOptions | number): Promise<void>

ensureDirSync(path: string, options?: EnsureOptions | number): void

findUpFile(root: string, file: string): string | undefined

importModule(mod: string, root?: string): Promise<any>