gridfile.relocate
Update paths to data sources catalogued in a gridfile
Syntax
Description
obj.relocate
Checks every data source file in the .grid file to make sure it still exists. If a data source cannot be found, the method searches the active path for files with the same name and extension. If a file with the same name is found, checks that the new file contains a data matrix with the same size and data type as the recorded data source. If so, stores the new file location for the data source. If a data source cannot be found and these criteria are not met, throws an error reporting the missing data source.
Note: This method only checks the existence of data sources located on a file system drive. Data sources accessed via an OPENDAP url are not checked.
obj.relocate(s)obj.relocate(sourceNames)
Specify which data sources should be checked and renamed. Any specified data sources accessed via an OPENDAP url are not checked.
obj.relocate(…, newNames)
Specify the new names to use for the data sources. Use this syntax when the file name or extension of a data source file has changed. This syntax also allows data sources accessed via an OPENDAP url to be relocated (either to a different OPENDAP url, or a local data file).