Module Node.Fs
Node FS API
see https://blogs.janestreet.com/a-and-a/ refernce documentation
ocaml
val readdirSync : string -> string arrayreasonml
let readdirSync: string => array(string);Most fs functions let you omit the callback argument. If you do, a default callback is used that rethrows errors. To get a trace to the original call site, set the `NODE_DEBUG` environment variable.
ocaml
val renameSync : string -> string -> unitreasonml
let renameSync: string => string => unit;ocaml
type fd = private intreasonml
type fd = pri int;ocaml
type path = stringreasonml
type path = string;The relative path to a filename can be used. Remember, however, that this path will be relative to process.cwd().
ocaml
module Watch : sig ... endreasonml
module Watch: { ... };ocaml
val ftruncateSync : fd -> int -> unitreasonml
let ftruncateSync: fd => int => unit;ocaml
val truncateSync : string -> int -> unitreasonml
let truncateSync: string => int => unit;ocaml
val chownSync : string -> uid:int -> gid:int -> unitreasonml
let chownSync: string => uid:int => gid:int => unit;ocaml
val fchownSync : fd -> uid:int -> gid:int -> unitreasonml
let fchownSync: fd => uid:int => gid:int => unit;ocaml
val readlinkSync : string -> stringreasonml
let readlinkSync: string => string;ocaml
val unlinkSync : string -> unitreasonml
let unlinkSync: string => unit;ocaml
val rmdirSync : string -> unitreasonml
let rmdirSync: string => unit;ocaml
val openSync :
path ->
[ `Read
| `Read_write
| `Read_write_sync
| `Write
| `Write_fail_if_exists
| `Write_read
| `Write_read_fail_if_exists
| `Append
| `Append_fail_if_exists
| `Append_read
| `Append_read_fail_if_exists ] ->
unitreasonml
let openSync:
path =>
[ `Read
| `Read_write
| `Read_write_sync
| `Write
| `Write_fail_if_exists
| `Write_read
| `Write_read_fail_if_exists
| `Append
| `Append_fail_if_exists
| `Append_read
| `Append_read_fail_if_exists ] =>
unit;type encoding = [| `hex| `utf8| `ascii| `latin1| `base64| `ucs2| `base64| `binary| `utf16leocaml
]reasonml
];ocaml
val readFileSync : string -> encoding -> stringreasonml
let readFileSync: string => encoding => string;ocaml
val readFileAsUtf8Sync : string -> stringreasonml
let readFileAsUtf8Sync: string => string;ocaml
val existsSync : string -> boolreasonml
let existsSync: string => bool;ocaml
val writeFileSync : string -> string -> encoding -> unitreasonml
let writeFileSync: string => string => encoding => unit;ocaml
val writeFileAsUtf8Sync : string -> string -> unitreasonml
let writeFileAsUtf8Sync: string => string => unit;