API:EPrints/TempDir

From EPrints Documentation
Revision as of 18:29, 11 August 2009 by Tdb01r (talk | contribs) (New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki

NAME

EPrints::TempDir - Create temporary directories that can automatically be removed

SYNOPSIS

 use EPrints::TempDir;
 
 my $dir = EPrints::TempDir->new(
   TEMPLATE => 'tempXXXXX',
   DIR => 'mydir',
   UNLINK => 1);
 
 opendir DIR, "$dir"; # Stringifies object
 

DESCRIPTION

This module is basically a clone of File::Temp, but provides an object-interface to directory creation. When the object goes out of scope (and UNLINK is specified) the directory will automatically get removed.

METHODS

new

 EPrints::TempDir->new()

Create a temporary directory (see File::Temp::tempdir for a description of the arguments);