forked from facebook/pyre-check
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyrePath.mli
50 lines (35 loc) · 1.19 KB
/
pyrePath.mli
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
39
40
41
42
43
44
45
46
47
48
49
50
(** Copyright (c) 2016-present, Facebook, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree. *)
open Core
type path = string
[@@deriving eq, show, sexp, hash]
type absolute
[@@deriving eq, show, sexp, hash]
type relative
[@@deriving eq, show, sexp, hash]
type t =
| Absolute of absolute
| Relative of relative
[@@deriving compare, eq, show, sexp, hash]
val absolute: t -> path
val relative: t -> path option
val uri: t -> path
val last: t -> path
val create_absolute: ?follow_symbolic_links: bool -> path -> t
val create_relative: root: t -> relative: path -> t
val get_relative_to_root: root: t -> path: t -> path option
val from_uri: path -> t option
val current_working_directory: unit -> t
val append: t -> element: path -> t
module AppendOperator : sig
val (^|): t -> path -> t
end
val real_path: t -> t
val is_directory: t -> bool
val file_exists: t -> bool
val list: ?filter:(string -> bool) -> root: t -> t list
val directory_contains: ?follow_symlinks: bool -> directory: t -> t -> bool
val search_upwards: target: string -> root: t -> t option
val remove: t -> unit
module Map: Map.S with type Key.t = t