UnixLabels.LargeFile(3) OCaml library UnixLabels.LargeFile(3)

# [NAME](#NAME)

UnixLabels.LargeFile - File operations on large files.

# [Module](#Module)

Module UnixLabels.LargeFile

# [Documentation](#Documentation)

Module **LargeFile**  
: **sig end**

File operations on large files. This sub-module provides 64-bit variants of the functions **UnixLabels.LargeFile.lseek** (for positioning a file descriptor), **UnixLabels.LargeFile.truncate** and **UnixLabels.LargeFile.ftruncate** (for changing the size of a file), and **UnixLabels.LargeFile.stat** , **UnixLabels.LargeFile.lstat** and **UnixLabels.LargeFile.fstat** (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type **int64** ) instead of regular integers (type **int** ), thus allowing operating on files whose sizes are greater than **max\_int** .

*val lseek* : **UnixLabels.file\_descr -&gt; int64 -&gt; mode:UnixLabels.seek\_command -&gt; int64**

See **lseek** .

*val truncate* : **string -&gt; len:int64 -&gt; unit**

See **truncate** .

*val ftruncate* : **UnixLabels.file\_descr -&gt; len:int64 -&gt; unit**

See **ftruncate** .

*type stats* = **Unix.LargeFile.stats** = {  
st\_dev : **int** ; (* Device number  
\*)  
st\_ino : **int** ; (* Inode number  
\*)  
st\_kind : **UnixLabels.file\_kind** ; (* Kind of the file  
\*)  
st\_perm : **UnixLabels.file\_perm** ; (* Access rights  
\*)  
st\_nlink : **int** ; (* Number of links  
\*)  
st\_uid : **int** ; (* User id of the owner  
\*)  
st\_gid : **int** ; (* Group ID of the file's group  
\*)  
st\_rdev : **int** ; (* Device ID (if special file)  
\*)  
st\_size : **int64** ; (* Size in bytes  
\*)  
st\_atime : **float** ; (* Last access time  
\*)  
st\_mtime : **float** ; (* Last modification time  
\*)  
st\_ctime : **float** ; (* Last status change time  
\*)  
}

*val stat* : **string -&gt; stats**

*val lstat* : **string -&gt; stats**

*val fstat* : **UnixLabels.file\_descr -&gt; stats**

2026-10-01 OCamldoc

---

Document: UnixLabels.LargeFile(3o) from ocaml 5.5.1-r1 (Chainguard OS)
Source: https://github.com/ocaml/ocaml
