GeoEco.DataManagement.Files.File.CopySilent

classmethod File.CopySilent(sourceFile, destinationFile, overwriteExisting=False)

Copies a file and logs a debug message rather than an informational message.

This method does the same thing as the File.Copy() method, except it logs a debug message rather than an informational message. It is intended for use when the file-copy operation is not important enough to warrant notifying the user (for example, when an output file is extracted from a temporary directory to the final location).

Parameters:
  • sourceFile (str) – File to copy. Minimum length꞉ 1. Must exist.

  • destinationFile (str) – Copy to create. Missing directories in this path will be created if they do not exist. Minimum length꞉ 1. Must be different than sourceFile.

  • overwriteExisting (bool, optional) – If True, the destination file will be overwritten, if it exists. If False, a ValueError will be raised if the destination file exists.