Files.splitPath: Split path into components

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/Files.r

Description

If the top volume in the 'path' is a rootVolume, then this function splits the path of the form rootVolume/userVolumeOwner/userVolume/relativePath/... and returns the vector c(rootVolume, userVolumeOwner, userVolume, relativePath, True). On the other hand, if the top volume in the 'path' is a dataVolume, then this function splits the path of the form dataVolume/relativePath/... and returns the vector c(dataVolume, None, None, relativePath, False).

Usage

1
Jobs.splitPath(path, fileService)

Arguments

path

file system path (string), starting from the root volume level. Example: rootVolume/userVolumeOwner/userVolume/relativePath...

fileService

name of fileService (string), or object (list) that defines a file service. A list of these kind of objects available to the user is returned by the function Files.getFileServices().

Value

a string vector containing the five components: (topVolume, userVolumeOwner, userVolume, relativePath, isTopVolumeARootVolume)

Author(s)

Manuchehr Taghizadeh-Popp
Maintainer: Manuchehr Taghizadeh-Popp <mtaghiza@jhu.edu>

References

http://www.sciserver.org
http://apps.sciserver.org
http://apps.sciserver.org/dashboard/files
http://www.github.com/sciserver/SciScript-R

See Also

Files.getFileServices, Files.getFileServiceFromName

Examples

1
splitPath  = Files.splitPath("Storage/myUserName/persistent/myFolder/myFile")

sciserver/SciScript-R documentation built on May 29, 2019, 3:45 p.m.