GeoEco.DataManagement.Directories.TemporaryDirectory.DecompressInputArgument

TemporaryDirectory.DecompressInputArgument(argName)

Decompresses the file specified by a method’s input argument into the temporary directory.

Note

This method is part of the internal implementation of GeoEco and is not intended to be used by external callers.

DecompressInputArgument() is intended to be called from methods that allow their callers to pass in the path of a compressed file as an input argument. If the passed-in path is a compressed file, DecompressInputArgument() will decompress it to the temporary directory and return the path of the decompressed file. If the passed-in path is not a compressed file, DecompressInputArgument() will return the passed-in path.

For a usage example, see GeoEco.DataManagement.BinaryRasters.BinaryRaster.SwapBytes().

Parameters:

argName (str) –

Name an input argument that may be a compressed file.

The calling method must pass in the name of one of its arguments. Do not pass in the path of the compressed file. The Type for the argument must be an instance of FileTypeMetadata. DecompressInputArgument() obtains the value of the argument (the path of the compressed file) from the local variables of the calling method’s stack frame.

Minimum length꞉ 1.

Returns:

Path of the decompressed file.

If the path provided to the calling function for the named argument is a path to a file that is not compressed, it will be returned.

If it is a path to a compressed file that is not an archive (i.e. only one file is compressed within it), the compressed file will be extracted to a subdirectory in the temporary directory, and the path to the decompressed file will be returned.

If the compressed file is an archive, the return value is the path to the decompressed file specified by the DecompressedFileToUse property of the FileTypeMetadata for the named argument.

Return type:

str