Skip to content

Commit cd5353e

Browse files
Julowjonludlam
authored andcommitted
Remove unused functions from odoc_odoc.Fs
1 parent 8478ff4 commit cd5353e

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

src/odoc/fs.ml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ module File = struct
5555
| Ok psuf -> Fpath.(normalize @@ (directory // psuf))
5656

5757
let to_string = Fpath.to_string
58-
let segs = Fpath.segs
5958

6059
let of_string s =
6160
match Fpath.of_string s with
@@ -124,16 +123,6 @@ module File = struct
124123
| [] -> invalid_arg "Fs.File.of_segs"
125124
| "" :: rest -> of_segs_tl (Fpath.v "/") rest
126125
| first :: rest -> of_segs_tl (Fpath.v first) rest
127-
128-
let append_segs path segs = of_segs_tl path segs
129-
130-
module Table = Hashtbl.Make (struct
131-
type nonrec t = t
132-
133-
let equal = Fpath.equal
134-
135-
let hash = Hashtbl.hash
136-
end)
137126
end
138127

139128
module Directory = struct
@@ -145,20 +134,6 @@ module Directory = struct
145134

146135
let append = Fpath.append
147136

148-
let make_path p name =
149-
match Fpath.of_string name with
150-
| Error _ as e -> e
151-
| Ok psuf -> Ok Fpath.(normalize @@ to_dir_path @@ (p // psuf))
152-
153-
let reach_from ~dir path =
154-
match make_path dir path with
155-
| Error (`Msg e) -> invalid_arg ("Odoc.Fs.Directory.create: " ^ e)
156-
| Ok path ->
157-
let pstr = Fpath.to_string path in
158-
if Sys.file_exists pstr && not (Sys.is_directory pstr) then
159-
invalid_arg "Odoc.Fs.Directory.create: not a directory";
160-
path
161-
162137
let contains ~parentdir f = Fpath.is_rooted ~root:parentdir f
163138

164139
let compare = Fpath.compare
@@ -206,12 +181,4 @@ module Directory = struct
206181
in
207182
try Ok (fold_files_rec ?ext f acc d)
208183
with Stop_iter (`Msg _ as e) -> Error e
209-
210-
module Table = Hashtbl.Make (struct
211-
type nonrec t = t
212-
213-
let equal = Fpath.equal
214-
215-
let hash = Hashtbl.hash
216-
end)
217184
end

src/odoc/fs.mli

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ module Directory : sig
3333

3434
val append : t -> t -> t
3535

36-
val reach_from : dir:t -> string -> t
37-
(** @raise Invalid_argument if [parent/name] exists but is not a directory. *)
38-
3936
val contains : parentdir:t -> file -> bool
4037

4138
val compare : t -> t -> int
@@ -64,8 +61,6 @@ module Directory : sig
6461
(** [fold_files_rec_result ~ext f acc d] recursively folds [f] over the files
6562
with extension matching [ext] (defaults to [""]) contained in [d] and its
6663
sub directories. Stop as soon as [f] returns [Error _]. *)
67-
68-
module Table : Hashtbl.S with type key = t
6964
end
7065

7166
module File : sig
@@ -89,8 +84,6 @@ module File : sig
8984

9085
val to_string : t -> string
9186

92-
val segs : t -> string list
93-
9487
val read : t -> (string, [> msg ]) result
9588

9689
val copy : src:t -> dst:t -> (unit, [> msg ]) result
@@ -100,9 +93,4 @@ module File : sig
10093
val of_segs : string list -> t
10194
(** [of_segs segs] Returns an absolute path if [segs] starts with an empty
10295
segment. Raises [Invalid_argument] if [segs] is empty. *)
103-
104-
val append_segs : t -> string list -> t
105-
(** Append a list of segments to a path. Do not raise. *)
106-
107-
module Table : Hashtbl.S with type key = t
10896
end

0 commit comments

Comments
 (0)