1UnixLabels.LargeFile(3) OCaml library UnixLabels.LargeFile(3)
2
3
4
6 UnixLabels.LargeFile - File operations on large files.
7
9 Module UnixLabels.LargeFile
10
12 Module LargeFile
13 : sig end
14
15
16 File operations on large files. This sub-module provides 64-bit vari‐
17 ants of the functions UnixLabels.LargeFile.lseek (for positioning a
18 file descriptor), UnixLabels.LargeFile.truncate and UnixLabels.Large‐
19 File.ftruncate (for changing the size of a file), and UnixLabels.Large‐
20 File.stat , UnixLabels.LargeFile.lstat and UnixLabels.LargeFile.fstat
21 (for obtaining information on files). These alternate functions repre‐
22 sent positions and sizes by 64-bit integers (type int64 ) instead of
23 regular integers (type int ), thus allowing operating on files whose
24 sizes are greater than max_int .
25
26
27
28
29
30
31 val lseek : UnixLabels.file_descr -> int64 -> mode:UnixLabels.seek_com‐
32 mand -> int64
33
34 See lseek .
35
36
37
38 val truncate : string -> len:int64 -> unit
39
40 See truncate .
41
42
43
44 val ftruncate : UnixLabels.file_descr -> len:int64 -> unit
45
46 See ftruncate .
47
48
49 type stats = Unix.LargeFile.stats = {
50 st_dev : int ; (* Device number
51 *)
52 st_ino : int ; (* Inode number
53 *)
54 st_kind : UnixLabels.file_kind ; (* Kind of the file
55 *)
56 st_perm : UnixLabels.file_perm ; (* Access rights
57 *)
58 st_nlink : int ; (* Number of links
59 *)
60 st_uid : int ; (* User id of the owner
61 *)
62 st_gid : int ; (* Group ID of the file's group
63 *)
64 st_rdev : int ; (* Device ID (if special file)
65 *)
66 st_size : int64 ; (* Size in bytes
67 *)
68 st_atime : float ; (* Last access time
69 *)
70 st_mtime : float ; (* Last modification time
71 *)
72 st_ctime : float ; (* Last status change time
73 *)
74 }
75
76
77
78
79
80 val stat : string -> stats
81
82
83
84
85 val lstat : string -> stats
86
87
88
89
90 val fstat : UnixLabels.file_descr -> stats
91
92
93
94
95
96
97OCamldoc 2022-02-04 UnixLabels.LargeFile(3)