UnixLabels.LargeFile(3)

okay so bestie, this is UnixLabels.LargeFile(3) from the OCaml library, and it’s literally all about file operations on large files 💅✨

💖 NAME

UnixLabels.LargeFile - File operations on large files.

🧚 Module

Module UnixLabels.LargeFile

✨ Documentation

Module LargeFile : sig end

File operations on large files. This sub-module is giving you 64-bit variants of 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. No cap, that’s the whole glow-up 🔥

  • val lseek : UnixLabels.file_descr -> int64 -> mode:UnixLabels.seek_command -> int64

See lseek.

  • val truncate : string -> len:int64 -> unit

See truncate.

  • val ftruncate : UnixLabels.file_descr -> len:int64 -> unit

See ftruncate.

and here’s the stats struct, she’s iconic 👑

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 -> stats
  • val lstat : string -> stats
  • val fstat : UnixLabels.file_descr -> stats

This lil’ page was served by OCamldoc, dated 2026-06-22, for the UnixLabels.LargeFile(3) manual — byeee bestie, slay your big files 💖🦋

📦 where this page comes from