-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathlfs.d.tl
More file actions
113 lines (89 loc) · 2.58 KB
/
lfs.d.tl
File metadata and controls
113 lines (89 loc) · 2.58 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
local record lfs
enum FileMode
"file"
"directory"
"link"
"socket"
"named pipe"
"char device"
"block device"
"other"
end
interface Attributes
dev: integer
ino: integer
mode: FileMode
nlink: integer
uid: integer
gid: integer
rdev: integer
access: integer
modification: integer
change: integer
size: integer
permissions: string
blocks: integer
blksize: integer
end
interface SymlinkAttributes is Attributes
target: string
end
enum AttributeSelInt
"dev"
"ino"
"nlink"
"uid"
"gid"
"rdev"
"access"
"modification"
"change"
"size"
"blocks"
"blksize"
end
enum AttributeSelStr
"permissions"
end
enum AttributeSelFM
"mode"
end
enum OpenFileMode
"binary"
"text"
end
enum LockMode
"r"
"w"
end
record Lock
free: function(self)
end
record DirObj
next: function(self): string
close: function(self)
end
dir: function(string): function(DirObj): (string), DirObj, nil, DirObj
chdir: function(string): boolean, string
lock_dir: function(string, ? integer): Lock, string
link: function(string, string, ? boolean): boolean, string
mkdir: function(string): boolean, string, integer
rmdir: function(string): boolean, string, integer
setmode: function(string, OpenFileMode): boolean, string
currentdir: function(): string, string
attributes: function(string): Attributes, string, integer
attributes: function(string, AttributeSelStr): string, string, integer
attributes: function(string, AttributeSelInt): integer, string, integer
attributes: function(string, AttributeSelFM): FileMode, string, integer
attributes: function(string, Attributes): Attributes, string, integer
symlinkattributes: function(string): SymlinkAttributes, string, integer
symlinkattributes: function(string, AttributeSelStr): string, string, integer
symlinkattributes: function(string, AttributeSelInt): integer, string, integer
symlinkattributes: function(string, AttributeSelFM): FileMode, string, integer
symlinkattributes: function(string, SymlinkAttributes): SymlinkAttributes, string, integer
touch: function(string, ? integer, ? integer): boolean, string
-- TODO: FILE needs to be renamed to io.FILE in tl itself
lock: function(FILE, LockMode, ? integer, ? integer): boolean, string
unlock: function(FILE, ? integer, ? integer): boolean, string
end
return lfs