Liking cljdoc? Tell your friends :D

std.fs.attribute


*empty*clj


+file-permissions+clj


attrclj

(attr name value)
(attr name value prefix)

creates an attribute for input to various functions

creates an attribute for input to various functions
raw docstring

attr-valueclj

(attr-value k v)

adjusts the attribute value for input

adjusts the attribute value for input
raw docstring

attributesclj

(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
raw docstring

attrs->mapclj

(attrs->map attrs)

converts the map of attributes into a clojure map

converts the map of attributes into a clojure map
raw docstring

from-permissionsclj

(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"
raw docstring

lookup-groupclj

(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)
raw docstring

lookup-ownerclj

(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)
raw docstring

map->attr-arrayclj

(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
raw docstring

ownerclj

(owner path)

returns the owner of the file

(owner "project.clj") => string?

returns the owner of the file

(owner "project.clj")
=> string?
raw docstring

set-attributesclj

(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"
raw docstring

set-ownerclj

(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)
raw docstring

to-mode-numberclj

(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"
raw docstring

to-mode-stringclj

(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"
raw docstring

to-permissionsclj

(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)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close