Re: A virtual file system.

From: Date: Mon, 23 Sep 2002 02:35:00 +0000
Subject: Re: A virtual file system.
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9328@lists.php.net to get a copy of this message
I had a quick look at this - it is very in keeping with hordes style of returning arrays for alot of things. - It would have been nicer to have an api which was more object based eg. $folder = VFS::factory('file:/home/me'); if ($folder->isDir) {
    $folder->opendir();
while ($folder->eof()) {
       $item = $folder->fetch();
       if ($item->isFile()) {
           echo $item->getContents();
       }
} } $file = VFS::factory('file:/home/me/myfile'); if (!$file->exists()) { $file->touch(); } if ( !$file->isSymlink()) { $file->write($somedata); } $file->rename('xxxx'); echo $file->basename(); echo $file->dirname(); echo $file->protocol(); echo $file->canWrite(); echo $file->canRead(); it would make the return values easier to document, and a little simpler... - but anyway since I dont have enought time to much more than comment.. - just a few 2c for the moment... Regards Alan Jon Wood wrote:
My thoughts as well - I saw this in Horde a while back, and thought it could be useful for other things as well. How much does it rely on the Horde framework to be used? Jon Quoting Richard Heyes <richard@v-webmail.co.uk>:
http://cvs.horde.org/cvs.php/horde/lib/VFS.php and http://cvs.horde.org/cvs.php/horde/lib/VFS/ We already have your first three, and would love to add webdav, etc.
     
HTTP I
hadn't thought of, but that's certainly a possibility too.
     
Could this be added to PEAR? It appears to be quite cool. -- Richard Heyes -- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.dev (#9328) next »