package xapi-stdext-unix

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

Module Unixext.DirectSource

Perform I/O in O_DIRECT mode using 4KiB page-aligned buffers

Sourcetype t

represents a file open in O_DIRECT mode

Sourceval openfile : string -> Unix.open_flag list -> Unix.file_perm -> t

openfile name flags perm behaves the same as Unix.openfile but includes the O_DIRECT flag

Sourceval close : t -> unit

close t closes t, a file open in O_DIRECT mode

Sourceval with_openfile : string -> Unix.open_flag list -> Unix.file_perm -> (t -> 'a) -> 'a

with_openfile name flags perm f opens name, applies the result to f and closes

Sourceval write : t -> bytes -> int -> int -> int

write t buf ofs len writes len bytes at offset ofs from buffer buf to t using page-aligned buffers.

Sourceval copy_from_fd : ?limit:int64 -> Unix.file_descr -> t -> int64

copy_from_fd ?limit fd t copies from fd to t up to limit

Sourceval fsync : t -> unit

fsync t commits all outstanding writes, throwing an error if necessary.

Sourceval lseek : t -> int64 -> Unix.seek_command -> int64

lseek t offset command: see Unix.LargeFile.lseek

OCaml

Innovation. Community. Security.