cf.Field.add_file_location

Field.add_file_location(location, constructs=True)[source]

Add a new file location in-place.

All data definitions that reference files are additionally referenced from the given location.

New in version 3.15.0.

Parameters
location: str

The new location.

constructs: bool, optional

If True (the default) then metadata constructs also have the new file location added to them.

Returns
str

The new location as an absolute path with no trailing separate pathname component separator.

Examples

>>> f.add_file_location('/data/model/')
'/data/model'