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

x/mesozoic/lib/file.ts>IFile

A generic build system for Deno web apps
Go to Latest
interface IFile
import { type IFile } from "https://deno.land/x/mesozoic@v1.0.0-alpha.19/lib/file.ts";

Methods

filename(): string
path(): string
relativePath(): string
url(): URL
alias(): string | undefined
aliasUrl(): URL | undefined
setAlias(alias: string): void
relativeAlias(): string | undefined
root(): string
extension(): string
read(): Promise<string>
readAsJson<T = unknown>(): Promise<T>
readBytes(): Promise<Uint8Array>
write(content: string | Uint8Array): Promise<void>
writeJson(value: any, pretty?: boolean): Promise<void>
copyTo(to: string, filePath?: string): Promise<IFile>
copyToHashed(to: string): Promise<IFile>
remove(): Promise<boolean>
rename(newFilename: string): Promise<string>
clone(): IFile