-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathfs.luau
More file actions
63 lines (47 loc) · 1.16 KB
/
fs.luau
File metadata and controls
63 lines (47 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
local fs = {}
export type FileHandle = {
fd: number,
err: number,
}
export type FileType = "file" | "dir" | "link" | "fifo" | "socket" | "char" | "block" | "unknown"
export type DirectoryEntry = {
name: string,
type: FileType,
}
function fs.open(path: string): FileHandle
error("not implemented")
end
function fs.read(handle: FileHandle): string
error("not implemented")
end
function fs.write(handle: FileHandle, contents: string): ()
error("not implemented")
end
function fs.close(handle: FileHandle): ()
error("not implemented")
end
function fs.remove(path: string): ()
error("not implemented")
end
function fs.type(path: string): FileType
error("not implemented")
end
function fs.mkdir(path: string): ()
error("not implemented")
end
function fs.listdir(path: string): { DirectoryEntry }
error("not implemented")
end
function fs.rmdir(path: string): ()
error("not implemented")
end
function fs.readfiletostring(filepath: string): string
error("not implemented")
end
function fs.writestringtofile(filepath: string, contents: string): ()
error("not implemented")
end
function fs.readasync(filepath: string): string
error("not implemented")
end
return fs