-
Notifications
You must be signed in to change notification settings - Fork 283
/
Copy pathService_OS.rei
54 lines (47 loc) · 1.48 KB
/
Service_OS.rei
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
module Api: {
let fold:
(
~includeFiles: string => bool,
~excludeDirectory: string => bool,
~initial: 'a,
('a, string) => 'a,
string
) =>
Lwt.t('a);
let glob:
(~includeFiles: string=?, ~excludeDirectories: string=?, string) =>
Lwt.t(list(string));
let rmdir: (~recursive: bool=?, string) => Lwt.t(unit);
let stat: string => Lwt.t(Luv.File.Stat.t);
let readdir: string => Lwt.t(list(Luv.File.Dirent.t));
let readFile: (~chunkSize: int=?, string) => Lwt.t(Bytes.t);
let writeFile: (~contents: Bytes.t, string) => Lwt.t(unit);
let rename:
(~source: string, ~target: string, ~overwrite: bool) => Lwt.t(unit);
let copy:
(~source: string, ~target: string, ~overwrite: bool) => Lwt.t(unit);
let mkdir: string => Lwt.t(unit);
let mktempdir: (~prefix: string=?, unit) => Lwt.t(string);
let delete: (~recursive: bool, string) => Lwt.t(unit);
let openURL: string => bool;
};
module Effect: {
let openURL: string => Isolinear.Effect.t(_);
let stat: (string, Unix.stats => 'msg) => Isolinear.Effect.t('msg);
let statMultiple:
(list(string), (string, Unix.stats) => 'msg) => Isolinear.Effect.t('msg);
module Dialog: {
let openFolder:
(~initialDirectory: string=?, option(Fp.t(Fp.absolute)) => 'msg) =>
Isolinear.Effect.t('msg);
};
};
module Sub: {
let dir:
(
~uniqueId: string,
~toMsg: result(list(Luv.File.Dirent.t), string) => 'msg,
string
) =>
Isolinear.Sub.t('msg);
};