parsl.data_provider.files.File

class parsl.data_provider.files.File(url: PathLike | str)[source]

The Parsl File Class.

This represents the global, and sometimes local, URI/path to a file.

Staging-in mechanisms may annotate a file with a local path recording the path at the far end of a staging action. It is up to the user of the File object to track which local scope that local path actually refers to.

__init__(url: PathLike | str)[source]

Construct a File object from a url string.

Parameters:

url (-) – url of the file e.g. - ‘input.txt’ - pathlib.Path(‘input.txt’) - ‘file:///scratch/proj101/input.txt’ - ‘globus://go#ep1/~/data/input.txt’ - ‘globus://ddb59aef-6d04-11e5-ba46-22000b92c6ec/home/johndoe/data/input.txt’

Methods

__init__(url)

Construct a File object from a url string.

cleancopy()

Returns a copy of the file containing only the global immutable state, without any mutable site-local local_path information.

Attributes

filepath

Return the resolved filepath on the side where it is called from.

cleancopy() File[source]

Returns a copy of the file containing only the global immutable state, without any mutable site-local local_path information. The returned File object will be as the original object was when it was constructed.

property filepath: str[source]

Return the resolved filepath on the side where it is called from.

The appropriate filepath will be returned when called from within an app running remotely as well as regular python on the submit side.

Only file: scheme URLs make sense to have a submit-side path, as other URLs are not accessible through POSIX file access.

Returns:

  • filepath