File tree Expand file tree Collapse file tree 3 files changed +1
-24
lines changed
Expand file tree Collapse file tree 3 files changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -1184,28 +1184,6 @@ let mkdir_p ?perms = function
11841184 (Outside_build_dir. append_local (Fdecl. get Build. build_dir) k)
11851185;;
11861186
1187- let touch ?(create = true ) p =
1188- let p =
1189- match p with
1190- | External s -> External. to_string s
1191- | In_source_tree s -> Local_gen. to_string s
1192- | In_build_dir k ->
1193- Outside_build_dir. to_string
1194- (Outside_build_dir. append_local (Fdecl. get Build. build_dir) k)
1195- in
1196- let create =
1197- if create
1198- then fun () -> Unix. close (Unix. openfile p [ Unix. O_CREAT ] 0o777 )
1199- else Fun. id
1200- in
1201- try Unix. utimes p 0.0 0.0 with
1202- | Unix. Unix_error (Unix. ENOENT, _ , _ ) -> create ()
1203- | Unix. Unix_error (Unix. EUNKNOWNERR 0 , _, _) when Sys. win32 && not (Sys. file_exists p)
1204- ->
1205- (* OCaml PR#8857 *)
1206- create ()
1207- ;;
1208-
12091187let extension t =
12101188 match t with
12111189 | External t -> External. extension t
Original file line number Diff line number Diff line change @@ -366,7 +366,6 @@ val rm_rf : ?allow_external:bool -> t -> unit
366366val clear_dir : t -> Fpath .clear_dir_result
367367
368368val mkdir_p : ?perms : int -> t -> unit
369- val touch : ?create : bool -> t -> unit
370369val build_dir_exists : unit -> bool
371370val ensure_build_dir_exists : unit -> unit
372371val source : Source .t -> t
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ let () = init ()
66
77let % expect_test " Temp.clear_dir works" =
88 let path = Temp. create Dir ~prefix: " dune" ~suffix: " unit_test" in
9- Path. touch (Path. relative path " foo" );
9+ Io. write_file (Path. relative path " foo" ) " " ;
1010 let print () =
1111 Path. readdir_unsorted path |> Result. to_dyn (list string ) opaque |> print_dyn
1212 in
You can’t perform that action at this time.
0 commit comments