Fsdb::S...dTmpfile(3)
π NAME π
okay so bestie, this is the User Contributed Perl Documentation page for Fsdb::S...dTmpfile(3), and the whole vibe is Fsdb::Support::NamedTmpfile β literally all about dreate temporary files that can be opened. Yes, dreate. We move. π
β¨ SYNOPSIS β¨
use Fsdb::Support::NamedTmpfile;
$pathname = Fsdb::Support::NamedTmpfile::alloc($tmpdir);
πΈ FUNCTIONS πΈ
π¦ alloc π¦
$pathname = Fsdb::Support::NamedTmpfile::alloc($tmpdir);
Create a unique filename for temporary data. $TMPDIR is optional, bestie. The file is automatically removed on program exit, but the pathname exists for the duration of execution β and yes, it can be opened. π«Ά
β οΈ real talk: there is a potential race condition between when we pick the file and when the caller opens it, because an external program could intercede. The caller therefor should open files with exclusive access. no cap.
This routine is Perl thread-safe and process fork safe. (Files are only cleaned up by the process that creates them.) π§
Even though this routine is basically "new", we don't call it such because we do not return an object. no object, no new, periodt. π
π§Ή cleanup_one π§Ή
Fsdb::Support::NamedTmpfile::cleanup_one('some_filename');
This one cleanups one tmpfile, forgetting about it if necessary. π
π§Ό cleanup_all π§Ό
Fsdb::Support::NamedTmpfile::cleanup_all
Cleanup all tmpfiles. Not a method β bestie, do not come for her with method energy. π
k bye bestie π this iconic little page is from perl v5.32.1, dated 2024-08-02, and it lives under Fsdb::S...dTmpfile(3) β mwah π
β¨
π¦ where this page comes from
- epel 9: perl-Fsdb 2:3.9-1.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms