Home » File System » File
Common file and directory routines
This package is unmaintained.
Download latest release 1.4.1 (archived versions might be outdated)
License: PHP
Description
Provides easy access to read/write to files along with
some common routines to deal with paths.
Documentation
Maintainers
- Richard Heyes (richard) — lead, inactive
- Tal Peer (tal) — lead, inactive
- Michael Wallner (mike) — lead, inactive
- Helgi Þormar Þorbjörnsson (dufuz) — lead, active
- Tomas V.V. Cox (cox) — developer, inactive
- Cipriano Groenendal (cipri) — developer, active
Dependencies
Required
- PHP (>= 4.3.0)
- PEAR Installer (>= 1.6.0)
- File_CSV (subpackage)
- File_Util (subpackage)
- pcre (extension)
Releases
- 1.4.1 (stable, 2012-04-06)
Release notes
License: PHP
QA release
Fix testsBug #19371 error during installation with pyrus
- 1.4.0 (stable, 2011-03-19)
- 1.4.0alpha1 (alpha, 2008-10-26)
Release notes
License: PHP
- Split File_CSV from File into it's own package
- Split File_Util from File into it's own package - 1.3.0 (stable, 2007-06-01)
- 1.3.0RC1 (beta, 2007-05-20)
Release notes
License: PHP
No code changes in this release
- 1.3.0a1 (alpha, 2007-05-13)
Release notes
License: PHP
* Fixed Bug #5045 File::stripTrailingSeparators should not rtrim the path "/" on linux (mike)
* Fixed Bug #5464 fwrite returns false but file checks for -1 (mike)
* Request #6316 File_CSV doesn't allow to read data from a file and after write data to the same file (helgi)
* Request #7559 File_Util::isIncludable() (file exists within include_path) (mike)
* Fixed Bug #7789 File::_getFilePointer() cannot return a reference (mike)
* Added more CSV tests (helgi)
* Moving the PHP dep to 4.3 to follow PEAR, adding dep on PEAR 1.5.0 to be sure people run proper PEAR version (helgi)
* File_CSV: add b mode to fopen in disoverFormat for portability (http://www.php.net/fopen)
* Fixed Bug #6447 Package will not install (helgi)
* Fixed Bug #5553 File_CSV should detect an occurance of delimeter in field and escape (helgi)
* Fixed Bug #4792 File_CSV: Last column keeps line breaks (helgi)
* Fixed Bug #10721 File_CSV: discoverFormat() can't handle large files (ieure)
* Fixed Bug #10883 Test 019 mislabeled
* Fixed Bug #10882 Tests fail (helgi / cipri)
* File_CSV: discoverFormat now uses the first 30 lines of the file. (helgi)
* File_CSV: supports reading ="" quoting, i.e. Excel only way of being smart with items starting with 00 and spaces and such (helgi)
* File_CSV: Now handles headers, pass header = true in the config for it to process it, we recommend reading like this:
$data = array();
File_CSV::read($file, $conf);
while ($res = File_CSV::read($file, $conf)) {
$data[] = $res;
}Note the first read call outside the while loop, it's because we don't want to include the header in the final data since
the first read gives that back just in case someone needs to do something else with those headers.
Passing this csv and the correct config:
header,body,foot
I'm a little header,this is my teapot,can't be!Will give you this:
Array
(
[0] => Array
(
[header] => I'm a little header
[body] => this is my teapot
[foot] => can't be!
))
detection of headers will never be added since CSV has no standard for defining what is a header and what is not (helgi)
- 1.2.2 (stable, 2005-09-10)
- 1.2.0 (stable, 2005-03-30)
Release notes
License: PHP
* Fixed package.xml for PEAR 1.4 (helgi)
+ added FILE_SORT_RANDOM mode (mike)
+ added File_Util::switchExt() (mike) - 1.1.0 (stable, 2005-02-21)
Release notes
License: PHP
* Fixed bug in File_Util::sortFiles() (mike, Demian Turner)
* Fixed infinity loop in readQuoted (File_CSV) when fields are more then expected (helgi)
* Fixed File_CSV tests (helgi) - 1.1.0RC5 (beta, 2005-02-02)
- 1.1.0RC4 (beta, 2005-02-02)
Release notes
License: PHP
* Required PHP dep now 4.2.0 because of PEAR (helgi)
* Patch from Firman Wandayandi for File_CSV (helgi)
- Fixed bugs: Fields count less nor more than expected handling
- Added Mac EOL support (Only loaded on PHP 4.3.0 and higher)
- Added few tests
* added kind of a filter callback for File_Util::listDir() (mike)
* Fixed Bug #3355 (missing delimiter of preg_quote() in File_Util::buildPath()) (mike)
* Fixed Bug #3357 (infinite loop in File_Util::realPath()) (mike) - 1.1.0RC3 (beta, 2005-01-13)
Release notes
License: PHP
* now really containing the fix for File_CSV
- 1.1.0RC2 (beta, 2005-01-12)
Release notes
License: PHP
* added File_Util containing all methods not handling file I/O (mike)
* deprecated methods are now available in File_Util (still in File for BC) (mike)
* fixed bug #2827 (File_CSV::discoverFormat() is unable to discover format in
one column CSV file), allows 1 field per line in discoverFormat as well as
the config overall, with no separator (which is the standard), removed
one error check to fix this issue as well as moving error checking around
in _conf, might give some people issues (can't see how tho), also added a
new param to discoverFormat so one can inject a check for $ as a separator
or something like that (helgi) - 1.1.0RC1 (beta, 2004-12-17)
Release notes
License: PHP
* Fixed Bug #2810 (Can not call readAll two times)
* Fixed file locking
- Code cleanup (vastly)
+ Implemented Request #1542 (File::relativePath(), File::realPath()) - 1.0.3 (stable, 2003-01-28)
Release notes
License: PHP
Fixed handling of paths containing '..' and '~' in File::isAbsolute().
- 1.0.2 (stable, 2002-05-26)
Release notes
License: PHP
Revert to mode specification instead of using _checkAppend() function
- 1.0.1 (stable, 2002-05-03)
Release notes
License: PHP
Bugfix in _checkAppend() usage
- 1.0.0 (stable, 2002-05-02)
Release notes
License: PHP
Stable release
- 0.9.2 (beta, 2002-04-25)
Release notes
License: PHP
Fixed bug apparent when using fopen wrappers
- 0.9.1 (beta, 2002-04-20)
Release notes
License: PHP
Initial release
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #1191 | Bogus | Bug | 2004-04-13 | File::readLine() stops on blank lines | |
| #1542 | Closed | Req | 2004-06-02 | Feature Request: adding some utility methods | |
| #2305 | Bogus | Bug | 2004-09-09 | bug about File::read() | |
| #2810 | Closed | Bug | 2004-11-22 | Can not call readAll two times ! | |
| #2827 | Closed | Bug | 2004-11-25 | File_CSV::discoverFormat() is unable to discover format in one column CSV file | |
| #3355 | Closed | Bug | 2005-02-02 | buildPath generates Warnings (missing delimiter in preg_quote()) | |
| #3357 | Closed | Bug | 2005-02-02 | realPath() ends up in an infinite loop | |
| #3364 | Closed | Bug | 2005-02-02 | Missing semicolon in Line 400 | |
| #3926 | Bogus | Req | 2005-03-22 | File_CVS gives no way to CLOSE a file handle | |
| #4295 | Closed | Bug | 2005-05-06 | csv file is not well closed | |
| #4334 | Closed | Bug | 2005-05-12 | File_CSV::discoverFormat does not detect quotes in single column | |
| #4559 | Closed | Bug | 2005-06-08 | Incorrect PHP version check | |
| #4792 | Closed | Bug | 2005-07-11 | File_CSV: Last column keeps line breaks | |
| #4835 | Closed | Bug | 2005-07-14 | ReadLine causes memory exhaustion | |
| #4865 | Duplicate | Bug | 2005-07-19 | File::ReadLine Doesn't Work at all | |
| #4911 | Closed | Bug | 2005-07-25 | Bad test in File_Util::isAbsolute | |
| #5032 | Closed | Bug | 2005-08-09 | Undefined variable in Util.php on line 77 | |
| #5045 | Closed | Bug | 2005-08-09 | File::stripTrailingSeparators should not rtrim the path "/" on linux | |
| #5071 | Bogus | Bug | 2005-08-11 | install File throws XML error | |
| #5134 | Bogus | Bug | 2005-08-18 | Upgrading File fails | |
| #5194 | Duplicate | Bug | 2005-08-24 | Installation failure | |
| #5237 | Bogus | Bug | 2005-08-29 | Corrupt package archive | |
| #5329 | Duplicate | Bug | 2005-09-07 | package.xml contains unparsable string | |
| #5464 | Closed | Bug | 2005-09-20 | fwrite returns false but file checks for -1 | |
| #5466 | Bogus | Bug | 2005-09-20 | buildpath seems to add incorrectly slash when used on windows | |
| #5553 | Closed | Bug | 2005-09-29 | File_CVS should detect an occurance of delimeter in field and escape | |
| #6166 | Closed | Doc | 2005-12-06 | Lack of information | |
| #6316 | Closed | Req | 2005-12-21 | The File_CSV doesn't allow to read data from a file and after write data | |
| #6447 | Closed | Bug | 2006-01-08 | Package will not install | |
| #7369 | No Feedback | Bug | 1.2.2 | 2006-04-11 | import csv with tab seperator fail |
| #7559 | Closed | Req | 1.2.2 | 2006-05-04 | fileExists method |
| #7789 | Closed | Bug | 1.2.2 | 2006-06-02 | &_getFilePointer() cannot return a reference |
| #10721 | Closed | Bug | 1.2.2 | 2007-04-14 | [PATCH] discoverFormat() can't handle large files |
| #10882 | Closed | Bug | CVS | 2007-04-29 | Tests fail |
| #10883 | Closed | Bug | CVS | 2007-04-29 | Test 019 mislabeled |
| #11019 | Closed | Bug | CVS | 2007-05-11 | Tests can only run from tests directory |
| #14339 | Bogus | Doc | 2008-07-12 | User note that is a documentation problem | |
| #16490 | Bogus | Bug | 1.3.0 | 2009-08-03 | File.php: non-static function and method errors |
| #18410 | Duplicate | Bug | 1.4.0 | 2011-03-30 | invalid package.xml; not installable with pyrus |
| #19133 | Bogus | Bug | 1.4.0 | 2011-12-13 | Endless loop in File_Iterator_Facade |
| #19371 | Closed | Bug | 2012-04-04 | error during installation with pyrus |