package fileutils

  1. Overview
  2. Docs
API to manipulate files (POSIX like) and filenames

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-fileutils-0.6.0.zip
md5=e7be073821779c52b74dcffa7edd456e
sha512=b6de447fa2c8bc2d2a465d5b9a0f6be4b63f10e491f52914fba32a178c48cd6bf162b52663b16f670fbe4f301c1bbcedba2b03088d89074c3c168c8668c6cc9d

doc/fileutils/FileUtil/Mode/index.html

Module FileUtil.Mode

Permission symbolic mode.

type who = [
  1. | `User
  2. | `Group
  3. | `Other
  4. | `All
]
type wholist = [
  1. | who
  2. | `List of who list
]
type permcopy = [
  1. | `User
  2. | `Group
  3. | `Other
]
type perm = [
  1. | `Read
  2. | `Write
  3. | `Exec
  4. | `ExecX
  5. | `Sticky
  6. | `StickyO
]
type permlist = [
  1. | perm
  2. | `List of perm list
]
type actionarg = [
  1. | permlist
  2. | permcopy
]
type action = [
  1. | `Set of actionarg
  2. | `Add of actionarg
  3. | `Remove of actionarg
]
type actionlist = [
  1. | action
  2. | `List of action list
]
type clause = [
  1. | `User of actionlist
  2. | `Group of actionlist
  3. | `Other of actionlist
  4. | `All of actionlist
  5. | `None of actionlist
]
type t = clause list

Typical symbolic mode:

  • g+r -> `Group (`Add `Read)
  • u=rw,g+rw,o-rwx -> `User (`Set (`List [`Read; `Write])); `Group (`Add (`List [`Read; `Write])); `Other (`Remove (`List [`Read; `Write; `Exec]))
OCaml

Innovation. Community. Security.