package fileutils

  1. Overview
  2. Docs
exception SizeInvalid
exception FileDoesntExist of FilePath.filename
exception RmDirNotEmpty of FilePath.filename
exception RmDirNoRecurse of FilePath.filename
exception MkdirMissingComponentPath of FilePath.filename
exception MkdirDirnameAlreadyUsed of FilePath.filename
exception CpCannotCopy of FilePath.filename
exception CpNoSourceFile of FilePath.filename
exception CpCannotCopyFilesToFile of FilePath.filename list * FilePath.filename
exception CpCannotCopyDir of FilePath.filename
exception MvNoSourceFile
type interactive =
  1. | Force
  2. | Ask of FilePath.filename -> bool
type size =
  1. | TB of int64
  2. | GB of int64
  3. | MB of int64
  4. | KB of int64
  5. | B of int64
type kind =
  1. | Dir
  2. | File
  3. | Dev_char
  4. | Dev_block
  5. | Fifo
  6. | Socket
type base_permission = {
  1. sticky : bool;
  2. exec : bool;
  3. write : bool;
  4. read : bool;
}
type permission = {
  1. user : base_permission;
  2. group : base_permission;
  3. other : base_permission;
}
type stat = {
  1. kind : kind;
  2. permission : permission;
  3. size : size;
  4. owner : int;
  5. group_owner : int;
  6. access_time : float;
  7. modification_time : float;
  8. creation_time : float;
}
type test_file =
  1. | Is_dev_block
  2. | Is_dev_char
  3. | Is_dir
  4. | Exists
  5. | Is_file
  6. | Is_set_group_ID
  7. | Has_sticky_bit
  8. | Is_pipe
  9. | Is_readable
  10. | Is_writeable
  11. | Size_not_null
  12. | Size_bigger_than of size
  13. | Size_smaller_than of size
  14. | Size_equal_to of size
  15. | Size_fuzzy_equal_to of size
  16. | Is_socket
  17. | Has_set_user_ID
  18. | Is_exec
  19. | Is_owned_by_user_ID
  20. | Is_owned_by_group_ID
  21. | Is_newer_than of FilePath.filename
  22. | Is_older_than of FilePath.filename
  23. | Is_newer_than_date of float
  24. | Is_older_than_date of float
  25. | And of test_file * test_file
  26. | Or of test_file * test_file
  27. | Not of test_file
  28. | Match of string
  29. | True
  30. | False
  31. | Has_extension of FilePath.extension
  32. | Has_no_extension
  33. | Is_parent_dir
  34. | Is_current_dir
  35. | Basename_is of FilePath.filename
  36. | Dirname_is of FilePath.filename
  37. | Custom of FilePath.filename -> bool
type touch_time_t =
  1. | Touch_now
  2. | Touch_file_time of FilePath.filename
  3. | Touch_timestamp of float
val permission_of_int : int -> permission
val int_of_permission : permission -> int
val byte_of_size : size -> int64
val size_add : size -> size -> size
val size_compare : ?fuzzy:bool -> size -> size -> int
val string_of_size : ?fuzzy:bool -> size -> string
module SetFilename : sig ... end
val doit : interactive -> FilePath.filename -> bool
val prevent_recursion : SetFilename.t -> SetFilename.elt -> SetFilename.t
val solve_dirname : FilePath.filename -> FilePath.filename
val stat : FilePath.filename -> stat
val compile_filter : ?match_compile:(FilePath.filename -> FilePath.filename -> bool) -> test_file -> ?pre_stat:stat -> FilePath.filename -> bool
val all_upper_dir : FilePath.filename -> FilePath.filename list
val test : ?match_compile:(FilePath.filename -> FilePath.filename -> bool) -> test_file -> FilePath.filename -> bool
val pwd : unit -> FilePath.filename
val filter : test_file -> FilePath.filename list -> FilePath.filename list
val mkdir : ?parent:bool -> ?mode:Unix.file_perm -> FilePath.filename -> unit
val touch : ?atime:bool -> ?mtime:bool -> ?create:bool -> ?time:touch_time_t -> FilePath.filename -> unit
val find : ?follow:action_link -> ?match_compile:(FilePath.filename -> FilePath.filename -> bool) -> test_file -> FilePath.filename -> ('a -> FilePath.filename -> 'a) -> 'a -> 'a
val rm : ?force:interactive -> ?recurse:bool -> FilePath.filename list -> unit
val cp : ?follow:action_link -> ?force:interactive -> ?recurse:bool -> FilePath.filename list -> FilePath.filename -> unit
val mv : ?force:interactive -> FilePath.filename -> FilePath.filename -> unit
val cmp : ?skip1:int -> FilePath.filename -> ?skip2:int -> FilePath.filename -> int option
val du : FilePath.filename list -> size * (FilePath.filename * size) list