Skip to content

Commit 9bd4c5c

Browse files
committed
Update docs
1 parent 45b2b27 commit 9bd4c5c

File tree

3 files changed

+114
-66
lines changed

3 files changed

+114
-66
lines changed

docs/Node/FS.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,66 @@
66
data FS :: !
77
```
88

9+
#### `FileDescriptor`
10+
11+
``` purescript
12+
data FileDescriptor :: *
13+
```
14+
15+
#### `FileFlags`
16+
17+
``` purescript
18+
data FileFlags
19+
= R
20+
| R_PLUS
21+
| RS
22+
| RS_PLUS
23+
| W
24+
| WX
25+
| W_PLUS
26+
| WX_PLUS
27+
| A
28+
| AX
29+
| A_PLUS
30+
| AX_PLUS
31+
```
32+
33+
#### `fileFlagsToNode`
34+
35+
``` purescript
36+
fileFlagsToNode :: FileFlags -> String
37+
```
38+
39+
#### `FileMode`
40+
41+
``` purescript
42+
type FileMode = Int
43+
```
44+
45+
#### `FilePosition`
46+
47+
``` purescript
48+
type FilePosition = Int
49+
```
50+
51+
#### `BufferLength`
52+
53+
``` purescript
54+
type BufferLength = Int
55+
```
56+
57+
#### `BufferOffset`
58+
59+
``` purescript
60+
type BufferOffset = Int
61+
```
62+
63+
#### `ByteCount`
64+
65+
``` purescript
66+
type ByteCount = Int
67+
```
68+
969
#### `SymlinkType`
1070

1171
``` purescript
@@ -21,4 +81,10 @@ instance showSymlinkType :: Show SymlinkType
2181
instance eqSymlinkType :: Eq SymlinkType
2282
```
2383

84+
#### `symlinkTypeToNode`
85+
86+
``` purescript
87+
symlinkTypeToNode :: SymlinkType -> String
88+
```
89+
2490

docs/Node/FS/Async.md

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ rename :: forall eff. FilePath -> FilePath -> Callback eff Unit -> Eff (fs :: FS
1515
#### `truncate`
1616

1717
``` purescript
18-
truncate :: forall eff. FilePath -> Number -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
18+
truncate :: forall eff. FilePath -> Int -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
1919
```
2020

2121
#### `chown`
2222

2323
``` purescript
24-
chown :: forall eff. FilePath -> Number -> Number -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
24+
chown :: forall eff. FilePath -> Int -> Int -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
2525
```
2626

2727
#### `chmod`
@@ -105,7 +105,7 @@ utimes :: forall eff. FilePath -> Date -> Date -> Callback eff Unit -> Eff (fs :
105105
#### `readFile`
106106

107107
``` purescript
108-
readFile :: forall eff. FilePath -> Callback eff Buffer -> Eff (fs :: FS | eff) Unit
108+
readFile :: forall eff. FilePath -> Callback (buffer :: BUFFER | eff) Buffer -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
109109
```
110110

111111
#### `readTextFile`
@@ -117,7 +117,7 @@ readTextFile :: forall eff. Encoding -> FilePath -> Callback eff String -> Eff (
117117
#### `writeFile`
118118

119119
``` purescript
120-
writeFile :: forall eff. FilePath -> Buffer -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
120+
writeFile :: forall eff. FilePath -> Buffer -> Callback (buffer :: BUFFER | eff) Unit -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
121121
```
122122

123123
#### `writeTextFile`
@@ -129,7 +129,7 @@ writeTextFile :: forall eff. Encoding -> FilePath -> String -> Callback eff Unit
129129
#### `appendFile`
130130

131131
``` purescript
132-
appendFile :: forall eff. FilePath -> Buffer -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
132+
appendFile :: forall eff. FilePath -> Buffer -> Callback (buffer :: BUFFER | eff) Unit -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
133133
```
134134

135135
#### `appendTextFile`
@@ -144,4 +144,40 @@ appendTextFile :: forall eff. Encoding -> FilePath -> String -> Callback eff Uni
144144
exists :: forall eff. FilePath -> (Boolean -> Eff (fs :: FS | eff) Unit) -> Eff (fs :: FS | eff) Unit
145145
```
146146

147+
#### `fdOpen`
148+
149+
``` purescript
150+
fdOpen :: forall eff. FilePath -> FileFlags -> Maybe FileMode -> Callback eff FileDescriptor -> Eff (fs :: FS | eff) Unit
151+
```
152+
153+
#### `fdRead`
154+
155+
``` purescript
156+
fdRead :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Callback (buffer :: BUFFER | eff) ByteCount -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
157+
```
158+
159+
#### `fdNext`
160+
161+
``` purescript
162+
fdNext :: forall eff. FileDescriptor -> Buffer -> Callback (buffer :: BUFFER | eff) ByteCount -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
163+
```
164+
165+
#### `fdWrite`
166+
167+
``` purescript
168+
fdWrite :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Callback (buffer :: BUFFER | eff) ByteCount -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
169+
```
170+
171+
#### `fdAppend`
172+
173+
``` purescript
174+
fdAppend :: forall eff. FileDescriptor -> Buffer -> Callback (buffer :: BUFFER | eff) ByteCount -> Eff (buffer :: BUFFER, fs :: FS | eff) Unit
175+
```
176+
177+
#### `fdClose`
178+
179+
``` purescript
180+
fdClose :: forall eff. FileDescriptor -> Callback eff Unit -> Eff (fs :: FS | eff) Unit
181+
```
182+
147183

docs/Node/FS/Sync.md

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,5 @@
11
## Module Node.FS.Sync
22

3-
#### `FileDescriptor`
4-
5-
``` purescript
6-
data FileDescriptor :: *
7-
```
8-
9-
#### `FileFlags`
10-
11-
``` purescript
12-
data FileFlags
13-
= R
14-
| R_PLUS
15-
| RS
16-
| RS_PLUS
17-
| W
18-
| WX
19-
| W_PLUS
20-
| WX_PLUS
21-
| A
22-
| AX
23-
| A_PLUS
24-
| AX_PLUS
25-
```
26-
27-
#### `BufferLength`
28-
29-
``` purescript
30-
type BufferLength = Int
31-
```
32-
33-
#### `BufferOffset`
34-
35-
``` purescript
36-
type BufferOffset = Int
37-
```
38-
39-
#### `ByteCount`
40-
41-
``` purescript
42-
type ByteCount = Int
43-
```
44-
45-
#### `FileMode`
46-
47-
``` purescript
48-
type FileMode = Int
49-
```
50-
51-
#### `FilePosition`
52-
53-
``` purescript
54-
type FilePosition = Int
55-
```
56-
573
#### `rename`
584

595
``` purescript
@@ -165,7 +111,7 @@ readTextFile :: forall eff. Encoding -> FilePath -> Eff (fs :: FS, err :: EXCEPT
165111
#### `writeFile`
166112

167113
``` purescript
168-
writeFile :: forall eff. FilePath -> Buffer -> Eff (fs :: FS, err :: EXCEPTION | eff) Unit
114+
writeFile :: forall eff. FilePath -> Buffer -> Eff (buffer :: BUFFER, fs :: FS, err :: EXCEPTION | eff) Unit
169115
```
170116

171117
#### `writeTextFile`
@@ -177,7 +123,7 @@ writeTextFile :: forall eff. Encoding -> FilePath -> String -> Eff (fs :: FS, er
177123
#### `appendFile`
178124

179125
``` purescript
180-
appendFile :: forall eff. FilePath -> Buffer -> Eff (fs :: FS, err :: EXCEPTION | eff) Unit
126+
appendFile :: forall eff. FilePath -> Buffer -> Eff (buffer :: BUFFER, fs :: FS, err :: EXCEPTION | eff) Unit
181127
```
182128

183129
#### `appendTextFile`
@@ -195,31 +141,31 @@ exists :: forall eff. FilePath -> Eff (fs :: FS | eff) Boolean
195141
#### `fdOpen`
196142

197143
``` purescript
198-
fdOpen :: forall opts eff. FilePath -> FileFlags -> Maybe FileMode -> Eff (err :: EXCEPTION, fs :: FS | eff) FileDescriptor
144+
fdOpen :: forall eff. FilePath -> FileFlags -> Maybe FileMode -> Eff (err :: EXCEPTION, fs :: FS | eff) FileDescriptor
199145
```
200146

201147
#### `fdRead`
202148

203149
``` purescript
204-
fdRead :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Eff (err :: EXCEPTION, fs :: FS | eff) ByteCount
150+
fdRead :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Eff (buffer :: BUFFER, err :: EXCEPTION, fs :: FS | eff) ByteCount
205151
```
206152

207153
#### `fdNext`
208154

209155
``` purescript
210-
fdNext :: forall eff. FileDescriptor -> Buffer -> Eff (err :: EXCEPTION, fs :: FS | eff) ByteCount
156+
fdNext :: forall eff. FileDescriptor -> Buffer -> Eff (buffer :: BUFFER, err :: EXCEPTION, fs :: FS | eff) ByteCount
211157
```
212158

213159
#### `fdWrite`
214160

215161
``` purescript
216-
fdWrite :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Eff (err :: EXCEPTION, fs :: FS | eff) ByteCount
162+
fdWrite :: forall eff. FileDescriptor -> Buffer -> BufferOffset -> BufferLength -> Maybe FilePosition -> Eff (buffer :: BUFFER, err :: EXCEPTION, fs :: FS | eff) ByteCount
217163
```
218164

219165
#### `fdAppend`
220166

221167
``` purescript
222-
fdAppend :: forall eff. FileDescriptor -> Buffer -> Eff (err :: EXCEPTION, fs :: FS | eff) ByteCount
168+
fdAppend :: forall eff. FileDescriptor -> Buffer -> Eff (buffer :: BUFFER, err :: EXCEPTION, fs :: FS | eff) ByteCount
223169
```
224170

225171
#### `fdFlush`

0 commit comments

Comments
 (0)