(attr name value)
(attr name value prefix)
creates an attribute for input to various functions
creates an attribute for input to various functions
(attr-value k v)
adjusts the attribute value for input
adjusts the attribute value for input
(attributes path)
shows all attributes for a given path
(attributes "project.clj") ;; {:owner "chris", ;; :group "staff", ;; :permissions "rw-r--r--", ;; :file-key "(dev=1000004,ino=2351455)", ;; :ino 2351455, ;; :is-regular-file true. ;; :is-directory false, :uid 501, ;; :is-other false, :mode 33188, :size 4342, ;; :gid 20, :ctime 1476755481000, ;; :nlink 1, ;; :last-access-time 1476755481000, ;; :is-symbolic-link false, ;; :last-modified-time 1476755481000, ;; :creation-time 1472282953000, ;; :dev 16777220, :rdev 0} => map
shows all attributes for a given path (attributes "project.clj") ;; {:owner "chris", ;; :group "staff", ;; :permissions "rw-r--r--", ;; :file-key "(dev=1000004,ino=2351455)", ;; :ino 2351455, ;; :is-regular-file true. ;; :is-directory false, :uid 501, ;; :is-other false, :mode 33188, :size 4342, ;; :gid 20, :ctime 1476755481000, ;; :nlink 1, ;; :last-access-time 1476755481000, ;; :is-symbolic-link false, ;; :last-modified-time 1476755481000, ;; :creation-time 1472282953000, ;; :dev 16777220, :rdev 0} => map
(attrs->map attrs)
converts the map of attributes into a clojure map
converts the map of attributes into a clojure map
(from-permissions modes)
transforms permissions to mode
(from-permissions [:owner-read :group-read :group-execute :others-read :others-execute]) => "455"
transforms permissions to mode (from-permissions [:owner-read :group-read :group-execute :others-read :others-execute]) => "455"
(lookup-group group)
lookup the user registry for the name
(lookup-group "WRONG") => (throws)
lookup the user registry for the name (lookup-group "WRONG") => (throws)
(lookup-owner owner)
lookup the user registry for the name
(lookup-owner "WRONG") => (throws)
lookup the user registry for the name (lookup-owner "WRONG") => (throws)
(map->attr-array m)
(map->attr-array m prefix)
converts a clojure map to an array of attrs
converts a clojure map to an array of attrs
(owner path)
returns the owner of the file
(owner "project.clj") => string?
returns the owner of the file (owner "project.clj") => string?
(set-attributes path m)
sets all attributes for a given path
(set-attributes "project.clj" {:owner "chris", :group "staff", :permissions "rw-rw-rw-"}) ;;=> #path:"/Users/chris/Development/chit/lucidity/project.clj"
sets all attributes for a given path (set-attributes "project.clj" {:owner "chris", :group "staff", :permissions "rw-rw-rw-"}) ;;=> #path:"/Users/chris/Development/chit/lucidity/project.clj"
(set-owner path owner)
sets the owner of a particular file
(set-owner "test" "WRONG") => (throws)
sets the owner of a particular file (set-owner "test" "WRONG") => (throws)
(to-mode-number s)
transforms mode numbers to mode strings
(to-mode-number "r--r-xr-x") => "455"
(to-mode-number "rwxrwxrwx") => "777"
transforms mode numbers to mode strings (to-mode-number "r--r-xr-x") => "455" (to-mode-number "rwxrwxrwx") => "777"
(to-mode-string s)
transforms mode numbers to mode strings
(to-mode-string "455") => "r--r-xr-x"
(to-mode-string "777") => "rwxrwxrwx"
transforms mode numbers to mode strings (to-mode-string "455") => "r--r-xr-x" (to-mode-string "777") => "rwxrwxrwx"
(to-permissions s)
transforms mode to permissions
(to-permissions "455") => (contains [:owner-read :group-read :group-execute :others-read :others-execute] :in-any-order)
transforms mode to permissions (to-permissions "455") => (contains [:owner-read :group-read :group-execute :others-read :others-execute] :in-any-order)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close