rmincUtil.isReadable: Check Read Permissions for Files

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/rmincUtil.R

Description

Return TRUE if all passed files are found to be readable. If any file is not readable, FALSE is returned.

Usage

1

Arguments

filenames

A character vector consisting of one or more filenames.

Details

When passed a character vector containing one or more files, the read permissions are checked for all files, and TRUE is returned if all files are found to be readable. This function works for all file types.

Value

TRUE is returned if all files are readable, else FALSE.

Note

This code was basically stolen from Jason Lerch and renamed. May dog have mercy on my sole.

Author(s)

Jim Nikelski nikelski@bic.mni.mcgill.ca

See Also

rmincUtil.isMinc rmincUtil.isMinc1 rmincUtil.isMinc2 rmincUtil.asMinc2

Examples

1
2
3
4
5
6
7
8
## Not run: 
# check for readability of a bunch of files
myFiles <- list.files(pattern=".mnc$")     # get all minc files in current directory
if ( !rmincUtil.isReadable(myFiles) ) {        # test for readability
    error("One of the files was unreadable.  Very sad, that.") 
}

## End(Not run)

jnikelski/rmincIO documentation built on May 19, 2019, 2:58 p.m.