Repository navigation
Expand file tree
/
Copy pathserverFiles.ml
More file actions
38 lines (33 loc) · 1.41 KB
/
Copy pathserverFiles.ml
File metadata and controls
38 lines (33 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(**
* 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.
*
*)
open Utils
open String_utils
let path_of_root root extension =
(* TODO: move this to places that write this file *)
Sys_utils.mkdir_no_fail GlobalConfig.tmp_dir;
let root_part = Path.slash_escaped_string_of_path root in
Filename.concat GlobalConfig.tmp_dir (spf "%s.%s" root_part extension)
let is_of_root root fn =
let root_part = Path.slash_escaped_string_of_path root in
string_starts_with fn (Filename.concat GlobalConfig.tmp_dir root_part)
(**
* Lock on this file will be held after the server has finished initializing.
* *)
let init_complete_file root = path_of_root root "init_complete"
let lock_file root = path_of_root root "lock"
let log_link root = path_of_root root "log"
let pids_file root = path_of_root root "pids"
let socket_file root = path_of_root root "sock"
let dfind_log root = path_of_root root "dfind"
let load_log root = path_of_root root "load"
let monitor_log_link root = path_of_root root "monitor_log"
let recorder_log_link root = path_of_root root "recorder_log"
let recorder_out_link root = path_of_root root "recorder_out"
let recorder_lock root = path_of_root root "recorder_lock"