file/file.ts

36 lines
906 B
TypeScript
Raw Normal View History

2024-10-11 12:02:48 +08:00
// just for develop
export default {
2024-10-26 22:12:41 +08:00
exists,
2024-10-11 12:02:48 +08:00
read,
readBytes,
write,
dir,
stat,
find,
remove,
rename,
copy,
cache
}
2024-10-26 22:12:41 +08:00
function exists(filename: string): boolean { return false }
function read(filename: string): string { return '' }
function readBytes(filename: string): any { return null }
function write(filename: string, data: any): void { }
function dir(filename: string): Array<FileInfo> { return null as any }
function stat(filename: string): FileInfo { return null as any }
function find(filename: string): string { return '' }
function remove(filename: string): void { }
function rename(from: string, to: string): void { }
function copy(from: string, to: string): void { }
function cache(filename: string, isCompress: boolean): void { }
2024-10-11 12:02:48 +08:00
interface FileInfo {
name: string
fullName: string
isDir: boolean
size: number
modTime: number
}