Package csb :: Package io :: Class TempFolder
[frames] | no frames]

Class TempFolder

source code

object --+
         |
        TempFolder

Create a temporary directory which is automatically wiped when the object is closed.

>>> with TempFolder() as tmp:
        # put some files in tmp.name...
Instance Methods
 
__del__(self) source code
 
__enter__(self) source code
 
__exit__(self, *args) source code
 
__init__(self, dispose=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
close(self)
Delete the entire directory and its contents.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
str name
Full directory name

Inherited from object: __class__

Method Details

__init__(self, dispose=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • dispose (bool) - automaticlaly delete the folder and its contents
Overrides: object.__init__
(inherited documentation)

Property Details

name

Full directory name

Get Method:
unreachable.name(self) - Full directory name
Type:
str