The Prune method removes catalog entries whose corresponding files are no longer present on disk.
Example
e = ENVI()
file = FILEPATH('natural_earth_shaded_relief.jp2', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY = ['data'])
tempFile = envi.GetTemporaryFilename('.tif')
File_Copy, file, tempFile
catalog = ENVICatalog()
print, catalog.n_entries
catalog.AddRaster, tempFile
print, catalog.n_entries
File_Delete, tempFile
catalog.Prune, DELETED_ENTRIES=deleted_entries
print, catalog.n_entries
print, deleted_entries
Syntax
ENVICatalog.Prune([, Keywords=value])
Arguments
None
Keywords
DELETED_ENTRIES
Set this keyword to a variable that will contain the array of files that have been pruned.
ERROR
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
Version History
See Also
ENVICatalog