rxLocateFile: Find File on a Given Data Path


Obtain the normalized absolute path to the first occurrence of the specified input file in the specified set of paths.


  rxLocateFile(file, pathsToSearch = NULL, fileSystem = NULL, 
     isOutFile = FALSE, defaultExt = ".xdf", verbose = 0)



Character string defining path to a file or a data source containing a file name.


character vector of search paths. If NULL, the search path determined by isOutFile is used. Only the paths listed are searched; the list is not recursive.


NULL, character string or RxFileSystem object indicating type of file system; "native"or RxNativeFileSystem object can be used for the local operating system, or an RxHdfsFileSystem object for the Hadoop file system. If NULL, the active compute context will be checked for a valid file system. If not available, rxGetOption("fileSystem") will be used to obtain the file system. If file is a data source containing a file system, that file system will take precedent.


logical value. If TRUE, search using outDataPath instead of dataPath in rxOptions or in the local compute context (e.g.,RxLocalSeq).


character string containing default extension to use if extension is missing from file.


integer value. If 0, no additional output is printed. If 1, information on the file to be located is printed.


The file path may be relative, for example, "one/two/myfile.xdf" or absolute, for example, "C:/one/two/myfile.xdf". If file is an absolute path, the existence of the file is verified and, if found, the absolute path is returned in normalized form. If file is a relative path, the current working directory and then any paths specified in pathsToSearch are prepended to file and a search for the file along the concatenated paths is performed. The first path where the file is found is returned in normalized form. If the file does not exist an error is thrown.


Microsoft Corporation Microsoft Technical Support


 ## Not run:

rxLocateFile( "myFile.xdf" )
## End(Not run)