File Name ↓ | File Size ↓ | Date ↓ |
---|---|---|
Parent directory/ | - | - |
sha1sum | 320 B | 2014-Jan-25 19:07 |
md5sum | 280 B | 2014-Jan-25 19:07 |
eFilesystem-1.0.4.tgz | 6.7 KiB | 2014-Jan-25 17:15 |
eFilesystem-1.0.3.tgz | 6.6 KiB | 2013-Aug-01 02:44 |
eFilesystem-1.0.2.tgz | 6.0 KiB | 2012-Oct-14 05:07 |
eFilesystem-1.0.1.tgz | 4.3 KiB | 2010-Nov-15 13:55 |
eFilesystem-1.0.0.tgz | 3.7 KiB | 2009-Aug-07 02:43 |
eFilesystem 클리스는 여러가지 확장된 시스템 function을 제공합니다.
<?php require_once 'eFilesystem.php'; function answer ($v) { echo ( $v === true ) ? 'OK' : 'FALSE'; echo "\n"; } echo "##### SELF test #############################################\n"; try { echo '1. check file_nr ... '; $r = eFilesystem::file_nr ('eFilesystem.php'); answer (is_array ($r) ? true : false); /* if ( is_array ($r) ) { ePrint::echoi ($r, 4); echo "\n"; } */ unset ($r); echo '2. check mkdir_p ... '; #echo ePrint::whiteSpace (4, true) . "indent 4\n"; $r = eFilesystem::mkdir_p ('./aaa/bbb'); answer ($r); if ( $r === true ) { chdir ('./aaa/bbb'); touch ('11.txt'); touch ('1.txt'); touch ('2.txt'); chdir ('../../'); echo " check tree ... \n"; ob_start (); eFilesystem::tree ('./aaa'); $capture = ob_get_contents (); ob_end_clean (); ePrint::echoi ($capture, 4); } echo '3. check unlink_r ... '; $r = eFilesystem::unlink_r ('./aaa'); answer ($r); echo "4. check dirlist ...\n"; $r = eFilesystem::dirlist ('./'); $r = array_merge ($r, eFilesystem::dirlist ('./', eFilesystem::RELATIVE)); $r = array_merge ($r, eFilesystem::dirlist ('./', eFilesystem::ABSOLUTE)); ePrint::echoi ($r, 4); echo "\n"; echo "5. check find ... \n"; $r = eFilesystem::find ('./'); ePrint::echoi ($r, 4); echo "\n\n"; echo "##### OBJ test #############################################\n"; echo '1. check file_nr ... '; $fs = new eFilesystem; $r = $fs->file_nr ('eFilesystem.php'); answer (is_array ($r) ? true : false); /* if ( is_array ($r) ) { $fs->echoi ($r, 4); echo "\n"; } */ unset ($r); echo '2. check mkdir_p ... '; #echo $fs->whiteSpace (4, true) . "indent 4\n"; $r = $fs->mkdir_p ('./aaa/bbb'); answer ($r); if ( $r === true ) { chdir ('./aaa/bbb'); touch ('11.txt'); touch ('1.txt'); touch ('2.txt'); chdir ('../../'); echo " check tree ... \n"; ob_start (); $fs->tree ('./aaa'); $capture = ob_get_contents (); ob_end_clean (); $fs->echoi ($capture, 4); } echo '3. check unlink_r ... '; $r = $fs->unlink_r ('./aaa'); answer ($r); echo "4. check dirlist ...\n"; $r = $fs->dirlist ('./'); $r = array_merge ($r, $fs->dirlist ('./', eFilesystem::RELATIVE)); $r = array_merge ($r, $fs->dirlist ('./', eFilesystem::ABSOLUTE)); $fs->echoi ($r, 4); echo "\n"; echo "5. check find ... \n"; $r = $fs->find ('./'); $fs->echoi ($r, 4); echo "\n"; } catch ( myException $e ) { fprintf (STDERR, "%s\n", $e->Message ()); #print_r ($e); #print_r ($e->Trace ()); #echo $e->TraceAsString () . "\n"; print_r ($e->TraceAsArray ()) . "\n"; $e->finalize (); } ?>Installation:
이 패키지는 다른 패키지에 의존성이 있습니다. 그러므로 아래의 pear 명령을 이용하여 설치하는 것을 권장 합니다.
shell> pear channel-discover pear.oops.org shell> pear install oops/eFilesystem shell> pear list -a