SparkFiles.
getRootDirectory
Get the root directory that contains files added through SparkContext.addFile() or SparkContext.addPyFile().
SparkContext.addFile()
SparkContext.addPyFile()
New in version 0.7.0.
the root directory that contains files added to resources
See also
SparkFiles.get()
Examples
>>> from pyspark.files import SparkFiles >>> SparkFiles.getRootDirectory() '.../spark-a904728e-08d3-400c-a872-cfd82fd6dcd2/userFiles-648cf6d6-bb2c-4f53-82bd-e658aba0c5de'