package core_unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This sub-module provides the normal OCaml Unix functions that deal with file size using native ints. These are here because, in general, you should be using 64bit file operations so that large files aren't an issue. If you have a real need to use potentially 31bit file operations (and you should be dubious of such a need) you can open this module

type stats = Core_unix__.Import.Unix.stats = {
  1. st_dev : int;
    (*

    Device number

    *)
  2. st_ino : int;
    (*

    Inode number

    *)
  3. st_kind : file_kind;
    (*

    Kind of the file

    *)
  4. st_perm : file_perm;
    (*

    Access rights

    *)
  5. st_uid : int;
    (*

    User id of the owner

    *)
  6. st_gid : int;
    (*

    Group ID of the file's group

    *)
  7. st_rdev : int;
    (*

    Device minor number

    *)
  8. st_size : int;
    (*

    Size in bytes

    *)
  9. st_atime : float;
    (*

    Last access time

    *)
  10. st_mtime : float;
    (*

    Last modification time

    *)
  11. st_ctime : float;
    (*

    Last status change time

    *)
}

The informations returned by the UnixLabels.stat calls.

val sexp_of_stats : stats -> Sexplib0.Sexp.t
val stats_of_sexp : Sexplib0.Sexp.t -> stats
val stat : string -> stats

Return the information for the named file.

val lstat : string -> stats

Same as UnixLabels.stat, but in case the file is a symbolic link, return the information for the link itself.

val fstat : File_descr.t -> stats

Return the information for the file associated with the given descriptor.

val lseek : File_descr.t -> int -> mode:seek_command -> int
val truncate : string -> len:int -> unit
val ftruncate : File_descr.t -> len:int -> unit
OCaml

Innovation. Community. Security.