Skip to content
Permalink
Browse files

Improve documentation and move fileutils to its own directory.

  • Loading branch information...
gildor478 committed Sep 14, 2019
1 parent 9c60a5f commit f047cd6ba5fa0a9839aefd2831f4eabfbfb5109f
Showing with 58 additions and 27 deletions.
  1. +7 −0 CHANGES.md
  2. +0 −18 src/dune
  3. 0 src/{ → lib/fileutils}/CommonPath.ml
  4. 0 src/{ → lib/fileutils}/ExtensionPath.ml
  5. 0 src/{ → lib/fileutils}/FilePath.ml
  6. 0 src/{ → lib/fileutils}/FilePath.mli
  7. 0 src/{ → lib/fileutils}/FilePath_type.ml
  8. 0 src/{ → lib/fileutils}/FileStringExt.ml
  9. 0 src/{ → lib/fileutils}/FileUtil.ml
  10. +7 −4 src/{ → lib/fileutils}/FileUtil.mli
  11. 0 src/{ → lib/fileutils}/FileUtilCHMOD.ml
  12. 0 src/{ → lib/fileutils}/FileUtilCMP.ml
  13. 0 src/{ → lib/fileutils}/FileUtilCP.ml
  14. 0 src/{ → lib/fileutils}/FileUtilDU.ml
  15. 0 src/{ → lib/fileutils}/FileUtilFIND.ml
  16. 0 src/{ → lib/fileutils}/FileUtilLS.ml
  17. 0 src/{ → lib/fileutils}/FileUtilMKDIR.ml
  18. 0 src/{ → lib/fileutils}/FileUtilMV.ml
  19. 0 src/{ → lib/fileutils}/FileUtilMisc.ml
  20. 0 src/{ → lib/fileutils}/FileUtilMode.ml
  21. 0 src/{ → lib/fileutils}/FileUtilPWD.ml
  22. 0 src/{ → lib/fileutils}/FileUtilPermission.ml
  23. 0 src/{ → lib/fileutils}/FileUtilREADLINK.ml
  24. 0 src/{ → lib/fileutils}/FileUtilRM.ml
  25. 0 src/{ → lib/fileutils}/FileUtilSTAT.ml
  26. 0 src/{ → lib/fileutils}/FileUtilSize.ml
  27. 0 src/{ → lib/fileutils}/FileUtilTEST.ml
  28. 0 src/{ → lib/fileutils}/FileUtilTOUCH.ml
  29. 0 src/{ → lib/fileutils}/FileUtilTypes.ml
  30. 0 src/{ → lib/fileutils}/FileUtilUMASK.ml
  31. 0 src/{ → lib/fileutils}/FileUtilWHICH.ml
  32. 0 src/{ → lib/fileutils}/UnixPath.ml
  33. 0 src/{ → lib/fileutils}/Win32Path.ml
  34. +33 −0 src/lib/fileutils/dune
  35. 0 src/{ → lib/fileutils/str}/FileUtilStr.ml
  36. +5 −0 src/lib/fileutils/str/dune
  37. +6 −5 test/test.ml
@@ -1,3 +1,10 @@
## unreleased

### Fixed

- Improve documentation: hide modules for the implementation.
- Move fileutils and fileutils.str in their own directories.

## v0.6.1 - 2019-09-12

### Fixed

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -128,13 +128,16 @@ sig
`Other (`Remove (`List [`Read; `Write; `Exec]))]
*)
type t = clause list

val to_string: t -> string
val apply: is_dir:bool -> umask:int -> Unix.file_perm -> t -> Unix.file_perm
end

(*********************************************************************)
(**
{2 Size operation}
*)

(** File size
@@ -208,9 +211,9 @@ val stat: ?dereference:bool -> filename -> stat

(*********************************************************************)
(**
{2 umask }
*)

exception UmaskError of string
@@ -336,7 +339,7 @@ type mkdir_error =
val mkdir:
?error:(mkdir_error error_handler) ->
?parent:bool ->
?mode:[< `Octal of Unix.file_perm | `Symbolic of FileUtilMode.t ] ->
?mode:[< `Octal of Unix.file_perm | `Symbolic of Mode.t ] ->
filename -> unit

(*********************************************************************)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,33 @@
(library
(name fileutils)
(public_name fileutils)
(wrapped false)
(private_modules
commonPath
extensionPath
filePath_type
fileStringExt
fileUtilCHMOD
fileUtilCMP
fileUtilCP
fileUtilDU
fileUtilFIND
fileUtilLS
fileUtilMKDIR
fileUtilMV
fileUtilMisc
fileUtilMode
fileUtilPWD
fileUtilPermission
fileUtilREADLINK
fileUtilRM
fileUtilSTAT
fileUtilSize
fileUtilTEST
fileUtilTOUCH
fileUtilTypes
fileUtilUMASK
fileUtilWHICH
unixPath
win32Path)
(libraries unix bytes stdlib-shims))
File renamed without changes.
@@ -0,0 +1,5 @@
(library
(name fileutils_str)
(public_name fileutils.str)
(wrapped false)
(libraries fileutils str))
@@ -523,7 +523,7 @@ let test_fileutil =
assert_equal
~printer:(fun s -> s)
str
(FileUtilMode.to_string mode))
(FileUtil.Mode.to_string mode))
[
"u+r", [`User (`Add `Read)];
"u+rw", [`User (`Add (`List [`Read; `Write]))];
@@ -540,9 +540,10 @@ let test_fileutil =
List.iter
(fun (is_dir, umask, i, m, e) ->
assert_equal
~msg:(Printf.sprintf "0o%04o + %s" i (FileUtilMode.to_string m))
~msg:(Printf.sprintf
"0o%04o + %s" i (FileUtil.Mode.to_string m))
~printer:(Printf.sprintf "0o%04o")
e (FileUtilMode.apply ~is_dir ~umask i m))
e (FileUtil.Mode.apply ~is_dir ~umask i m))
[
false, 0o022, 0o0600,
[`Group (`Add `Read)], 0o0640;
@@ -1203,7 +1204,7 @@ let test_fileutil =
test_umask
(umask (`Octal (fun i -> i)));
assert_equal
~printer:FileUtilMode.to_string
~printer:FileUtil.Mode.to_string
[`User (`Set (`List [`Read; `Write; `Exec]));
`Group (`Set (`List [`Read; `Exec]));
`Other (`Set (`List [`Read; `Exec]))]
@@ -1236,7 +1237,7 @@ let test_fileutil =
assert_equal
~msg:(Printf.sprintf
"0o%04o + %s -> 0o%04o"
msk (FileUtilMode.to_string s) e)
msk (FileUtil.Mode.to_string s) e)
~printer:(Printf.sprintf "0o%04o")
e (umask ~mode:(`Symbolic s) (`Octal (fun i -> i)))))
[

0 comments on commit f047cd6

Please sign in to comment.
You can’t perform that action at this time.