attr: func [
{Return current attributes for the file.}
file [file!]
/with {Retrieve only selected attributes.}
sel {Selected attributes to retrieve.}
/avail {Return a list of attributes available for the file.}
/copy {Copy all attributes, which are safe to copy, to f2.}
f2 [file!]
/local a
][
if with [return get-modes file sel]
if avail [return get-modes file 'file-modes]
if copy [
;set-modes f2 a: get-modes file get-modes file 'copy-modes
; Core 2.5 includes full-path, which it shouldn't
;set-modes f2 a: get-modes file exclude get-modes file 'copy-modes [full-path]
set-modes f2 a: get-modes file get-modes file 'copy-modes
return a
]
get-modes file get-modes file 'file-modes
]
You need to create an account or log in to post comments to this site.