API:EPrints/TempDir: Difference between revisions
⧼vector-appearance-label⧽
Removing all content from page |
No edit summary |
||
| Line 1: | Line 1: | ||
<!-- Pod2Wiki=_preamble_ | |||
This page has been automatically generated from the EPrints 3.2 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost. | |||
-->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/TempDir.pm|package_name=EPrints::TempDir}}[[Category:API|TempDir]]<div><!-- Edit below this comment --> | |||
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name --> | |||
==NAME== | |||
EPrints::TempDir - Create temporary directories that can automatically be removed | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=head_synopsis --> | |||
==SYNOPSIS== | |||
use EPrints::TempDir; | |||
my $dir = EPrints::TempDir->new( | |||
TEMPLATE => 'tempXXXXX', | |||
DIR => 'mydir', | |||
UNLINK => 1); | |||
opendir DIR, "$dir"; # Stringifies object | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=head_description --> | |||
==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. | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=head_methods --> | |||
==METHODS== | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=item_new --> | |||
===new=== | |||
EPrints::TempDir->new() | |||
Create a temporary directory (see {{API:PodLink|file=File/Temp|package_name=File::Temp|section=|text=File::Temp}}::tempdir for a description of the arguments); | |||
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce; padding: 0em 1em 0em 1em; font-size: 80%; '> | |||
<span style='display:none'>User Comments</span> | |||
<!-- Edit below this comment --> | |||
<!-- Pod2Wiki= --> | |||
</div> | |||
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment --> | |||
Revision as of 13:32, 25 February 2010
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
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);