Path: usenet.cise.ufl.edu!barley.lw.net!news.icix.net!uunet!in2.uu.net!192.108.254.3!news.teleport.com!not-for-mail
From: Carey Evans <
[email protected]>
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: ANNOUNCE: File::Sync - fsync() and sync()
Followup-To: comp.lang.perl.modules
Date: 21 Feb 1997 18:26:47 GMT
Organization: CLEAR Net
Lines: 34
Sender:
[email protected]
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
References: <
[email protected]>
NNTP-Posting-Host: gadget.cscaper.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:106 comp.lang.perl.modules:1826
I have uploaded my File::Sync module to CPAN. Simply put, it
implements the POSIX.1b fsync() function, and the *nix sync()
function. The version is 0.04, but previous versions were not
released.
In more detail, the following functions are provided:
fsync FILEHANDLE
Calls the POSIX.1b fsync(2) function on the given file handle,
copying all parts of a file still in the OS's buffers to
disk.
fsync_fd FD
Internal function - calls fsync(2) given integer file
descriptor.
sync
Calls the *nix sync(2) function, to flush all filesystem
buffers to disk.
File::Sync also puts its fsync() subroutine in FileHandle and
IO::Handle, so $fh->fsync() will work if $fh is a FileHandle.
Since uploading the module, it's been pointed out to me that sync()
probably belongs in a Filesys::Sync module, and fsync() in IO::Handle.
I'll see what happens.
--
Carey Evans <*>
[email protected]
"Linux and Linux-like systems such as UNIX(R) and FreeBSD..."
- Yggdrasil Computing, <
[email protected]>