Announcing New PHP Extension: FileConv
| From: | Daniel Brown | Date: | Sat, 11 Dec 2010 19:41:19 +0000 |
| Subject: | Announcing New PHP Extension: FileConv | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-309962@lists.php.net to get a copy of this message | ||
Happy Saturday, folks;
I've finally gotten around to releasing my latest PHP extension
(which was actually written about two years ago). Named FileConv, it
adds native functions for converting back and forth between DOS, *NIX,
and legacy MacOS file formats. It's compact, comes with a basic
installer, and can convert a 1MB text file to/from any of the included
formats in approximately one-tenth of one second. Unlike many
versions that you could otherwise use from the command line, this
library allows the file to retain its original timestamps, as well.
I ran through some recursive directories of files with a test
script, determining which files were text versus which were binary,
detected the formatting of the text files, and converted to a
different format at random (if Mac, go to DOS/*NIX, if *NIX, go to
Mac/DOS, etc.). Approximately 1.5GB of files were scanned, detected,
and translated, with a cost of 1 minute 24 seconds.
You can read more about the library and download it yourself at
http://links.parasane.net/n4c4 . After doing some code
cleanup when I
have time, the next step will be continuing with the process of
getting it into PECL, as was initially planned two years ago.
--
</Daniel P. Brown>
Network Infrastructure Manager
Documentation, Webmaster Teams
http://www.php.net/