mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
Added CCIO.remove_safe.
This commit is contained in:
parent
bd84b620ec
commit
4f7ea8de64
2 changed files with 3 additions and 0 deletions
|
|
@ -209,6 +209,8 @@ module File = struct
|
||||||
|
|
||||||
let remove f = Sys.remove f
|
let remove f = Sys.remove f
|
||||||
|
|
||||||
|
let remove_safe f = try Sys.remove f with _ -> ()
|
||||||
|
|
||||||
let read_dir_base d =
|
let read_dir_base d =
|
||||||
if Sys.is_directory d
|
if Sys.is_directory d
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ module File : sig
|
||||||
val is_directory : t -> bool
|
val is_directory : t -> bool
|
||||||
|
|
||||||
val remove : t -> unit
|
val remove : t -> unit
|
||||||
|
val remove_safe : t -> unit
|
||||||
|
|
||||||
val read_dir : ?recurse:bool -> t -> t gen
|
val read_dir : ?recurse:bool -> t -> t gen
|
||||||
(** [read_dir d] returns a sequence of files and directory contained
|
(** [read_dir d] returns a sequence of files and directory contained
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue