getRootFileSystem

fun getRootFileSystem(context: Context, granularity: RootGranularity = RootGranularity.PROJECT): FileSystem?

Retrieves the relative path to the root of the file system. The root of the file system is determined by the working directory of the current subdocument.

Example:

  • When used in the root folder: .pathtoroot returns .

  • When used in <root>/subfolder: .pathtoroot returns ..

  • When used in <root>/subfolder1/subfolder2: .pathtoroot returns ../..

Return

a string value of the relative path to the root of the file system

Throws

if the relative path cannot be determined