Package omero :: Package util :: Module temp_files
[hide private]
[frames] | no frames]

Module temp_files

source code

OMERO Support for temporary files and directories

Classes [hide private]
  TempFileManager
Creates temporary files and folders and makes a best effort to remove them on exit (or sooner).
Functions [hide private]
 
create_path(prefix="omero", suffix=".tmp", folder=False)
Uses the global TempFileManager to create a temporary file.
source code
 
remove_path(file)
Removes the file from the global TempFileManager.
source code
 
gettempdir()
Returns the dir value for the global TempFileManager.
source code
Variables [hide private]
  manager = TempFileManager()
Global TempFileManager instance for use by the current process and registered with the atexit module for cleaning up all created files on exit.

Imports: os, sys, atexit, logging, tempfile, threading, traceback, exceptions, portalocker, path, get_user_dir, get_user, configure_logging


Function Details [hide private]

remove_path(file)

source code 

Removes the file from the global TempFileManager. The file will be deleted if it still exists.


Variables Details [hide private]

manager

Global TempFileManager instance for use by the current process and registered with the atexit module for cleaning up all created files on exit. Other instances can be created for specialized purposes.

Value:
TempFileManager()