package hack_parallel

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

* Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the "hack" directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. *

exception NotADirectory of string
val realpath : string -> string option
val is_nfs : string -> bool
val get_env : string -> string option

Hack_option type intead of exception throwing.

val getenv_user : unit -> string option
val getenv_home : unit -> string option
val getenv_term : unit -> string option
val path_sep : string
val null_path : string
val temp_dir_name : string
val getenv_path : unit -> string option
val open_in_no_fail : string -> in_channel
val open_in_bin_no_fail : string -> in_channel
val close_in_no_fail : string -> in_channel -> unit
val open_out_no_fail : string -> out_channel
val open_out_bin_no_fail : string -> out_channel
val close_out_no_fail : string -> out_channel -> unit
val cat : string -> string
val cat_no_fail : string -> string
val nl_regexp : Str.regexp
val split_lines : string -> string list
val string_contains : string -> string -> bool

Returns true if substring occurs somewhere inside str.

val exec_read : string -> string
val exec_read_lines : ?reverse:bool -> string -> string list
val rm_dir_tree : string -> unit

Deletes the file given by "path". If it is a directory, recursively * deletes all its contents then removes the directory itself.

val restart : unit -> 'a
val logname_impl : unit -> string
val logname_ref : string option ref
val logname : unit -> string
val with_umask : int -> (unit -> 'a) -> 'b
val read_stdin_to_string : unit -> string
val read_all : ?buf_size:int -> in_channel -> string
val expanduser : string -> string

* Like Python's os.path.expanduser, though probably doesn't cover some cases. * Roughly follow's bash's tilde expansion: * http://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html * * ~/foo -> /home/bob/foo if $HOME = "/home/bob" * ~joe/foo -> /home/joe/foo if joe's home is /home/joe

val executable_path : unit -> string
val lines_of_in_channel : in_channel -> string list
val lines_of_file : string -> string list
val read_file : string -> bytes
val write_file : file:string -> string -> unit
val append_file : file:string -> string -> unit
val filemtime : string -> float
val lutimes : string -> unit
val try_touch : follow_symlinks:bool -> string -> unit
val mkdir_p : string -> unit
val mkdir_no_fail : string -> unit
val splitext : string -> string * string
val is_test_mode : unit -> bool
val setsid : unit -> int
val set_signal : int -> Sys.signal_behavior -> unit
val signal : int -> Sys.signal_behavior -> unit
val get_total_ram : unit -> int
val uptime : unit -> int
val nproc : unit -> int
val total_ram : int
val nbr_procs : int
val set_priorities : cpu_priority:int -> io_priority:int -> unit
val pid_of_handle : int -> int
val handle_of_pid_for_termination : int -> int
val terminate_process : int -> unit
val lstat : string -> Unix.stats
val normalize_filename_dir_sep : string -> string
val name_of_signal : int -> string