Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/justaos_utils/packages/file-utils/src/FileUtils.ts>default

Common utility functions used across projects
Go to Latest
class default
import { default } from "https://deno.land/x/justaos_utils@v1.9.0/packages/file-utils/src/FileUtils.ts";

Static Methods

copy(sourcePath: string, destinationPath: string)
copySync(
sourcePath: string,
destinationPath: string,
options?: any,
)
exists(filePath: string): Promise<boolean>
existsSync(filePath: string): boolean
mkdirSync(filePath: string, options?: MkdirOptions): void
readFile(filePath: string): Uint8Array
readFileSync(filePath: string)
readJsonFilesFromPathSync(filePath: string): any[]
readJsonFileSync(filePath: string): any
readTextFile(filePath: string): Promise<string>
readTextFileSync(filePath: string)
remove(path: string, options?: RemoveOptions)
removeSync(path: string, options?: RemoveOptions)
unZip(zipSourcePath: string, destinationPath: string)
unZipFromURL(downloadUrl: URL, destinationPath: string)
writeJsonFileSync(filePath: string, object: any)
writeTextFileSync(filePath: string, content: string)