Convert or print integers in octal format, with as many digits as are needed to display the largest, using leading zeroes as necessary.
as.octmode(x)<p></p><p># S3 method for octmode
as.character(x, …)</p><p># S3 method for octmode
format(x, width = NULL, …)</p><p># S3 method for octmode
print(x, …)</p>
| Parameter | Description |
|---|---|
x |
An object, for the methods inheriting from class "octmode". |
width |
NULL or a positive integer specifying the minimum field width to be used, with padding by leading zeroes. |
… |
further arguments passed to or from other methods. |
# NOT RUN {
(on <- as.octmode(c(16, 32, 127:129))) # "020" "040" "177" "200" "201"
unclass(on[3:4]) # subsetting
## manipulate file modes
fmode <- as.octmode("170")
(fmode | "644") & "755"
# }
# NOT RUN {
umask <- Sys.umask(NA) # depends on platform
c(fmode, "666", "755") & !umask
# }