Gossamer Forum
Quote Reply
Tempfile -- Tempdir
Alex,

Would it be possible to generalize the Tempfile.pm to handle an entire directory? Such that when the temp directory object went out of scope, it was deleted, recursively, if necessary (rm -R $tempdir)

What I am trying to do, or am doing, but not in an OOP way, is using $tempdir/$id to hold the current uploads. This mimics the $attach_dir/$id path that the successful upload and process will end up in. (File::Copy($tempfile, $attachfile))

Once done, the $tempdir/$id directory can go away. Housekeeping.

I can do this manually, of course, but this is a great expansion of the $tempfile object, to handling "work directories" that get cleaned up automatically.

I'm tryin to understand the module hierarchy, starting with Base, and using that to develop both the multiple file upload program (move it over to the OOP format) and the Image Gallery program.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Plugins:http://LinkSQL.com/plugin
Subject Author Views Date
Thread Tempfile -- Tempdir pugdog 2718 Jul 16, 2001, 11:30 PM
Thread Re: Tempfile -- Tempdir
Alex 2654 Jul 17, 2001, 9:08 AM
Thread Re: Tempfile -- Tempdir
pugdog 2648 Jul 17, 2001, 9:55 AM
Post Re: Tempfile -- Tempdir
Alex 2594 Jul 31, 2001, 12:40 AM