896 linhas
29 KiB
PHP
896 linhas
29 KiB
PHP
<?php
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
|
|
*
|
|
* The SplFileInfo class offers a high-level object oriented interface to
|
|
* information for an individual file.
|
|
*
|
|
*/
|
|
class SplFileInfo {
|
|
private $rsrc;
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.construct.php )
|
|
*
|
|
* Creates a new SplFileInfo object for the file_name specified. The file
|
|
* does not need to exist, or be readable.
|
|
*
|
|
* @file_name mixed Path to the file.
|
|
*/
|
|
public function __construct($file_name) {
|
|
hphp_splfileinfo___construct($this, $file_name);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getpath.php )
|
|
*
|
|
* Returns the path to the file, omitting the filename and any trailing
|
|
* slash.
|
|
*
|
|
* @return mixed Returns the path to the file.
|
|
*/
|
|
public function getPath() {
|
|
return hphp_splfileinfo_getpath($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getfilename.php )
|
|
*
|
|
* Gets the filename without any path information.
|
|
*
|
|
* @return mixed The filename.
|
|
*/
|
|
public function getFilename() {
|
|
return hphp_splfileinfo_getfilename($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getfileinfo.php )
|
|
*
|
|
* This method gets an SplFileInfo object for the referenced file.
|
|
*
|
|
* @class_name mixed Name of an SplFileInfo derived class to use.
|
|
*
|
|
* @return mixed An SplFileInfo object created for the file.
|
|
*/
|
|
public function getFileInfo($class_name = "") {
|
|
return hphp_splfileinfo_getfileinfo($this, $class_name);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getbasename.php )
|
|
*
|
|
* This method returns the base name of the file, directory, or link
|
|
* without path info.
|
|
*
|
|
* @suffix mixed Optional suffix to omit from the base name returned.
|
|
*
|
|
* @return mixed Returns the base name without path information.
|
|
*/
|
|
public function getBasename($suffix = "") {
|
|
return hphp_splfileinfo_getbasename($this, $suffix);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getpathname.php )
|
|
*
|
|
* Returns the path to the file.
|
|
*
|
|
* @return mixed The path to the file.
|
|
*/
|
|
public function getPathname() {
|
|
return hphp_splfileinfo_getpathname($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getpathinfo.php )
|
|
*
|
|
* Gets an SplFileInfo object for the parent of the current file.
|
|
*
|
|
* @class_name mixed Name of an SplFileInfo derived class to use.
|
|
*
|
|
* @return mixed Returns an SplFileInfo object for the parent path of
|
|
* the file.
|
|
*/
|
|
public function getPathInfo($class_name = "") {
|
|
return hphp_splfileinfo_getpathinfo($this, $class_name);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getperms.php )
|
|
*
|
|
* Gets the file permissions for the file.
|
|
*
|
|
* @return mixed Returns the file permissions.
|
|
*/
|
|
public function getPerms() {
|
|
return hphp_splfileinfo_getperms($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getinode.php )
|
|
*
|
|
* Gets the inode number for the filesystem object.
|
|
*
|
|
* @return mixed Returns the inode number for the filesystem object.
|
|
*/
|
|
public function getInode() {
|
|
return hphp_splfileinfo_getinode($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getsize.php )
|
|
*
|
|
* Returns the filesize in bytes for the file referenced.
|
|
*
|
|
* @return mixed The filesize in bytes.
|
|
*/
|
|
public function getSize() {
|
|
return hphp_splfileinfo_getsize($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getowner.php )
|
|
*
|
|
* Gets the file owner. The owner ID is returned in numerical format.
|
|
*
|
|
* @return mixed The owner id in numerical format.
|
|
*/
|
|
public function getOwner() {
|
|
return hphp_splfileinfo_getowner($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getgroup.php )
|
|
*
|
|
* Gets the file group. The group ID is returned in numerical format.
|
|
*
|
|
* @return mixed The group id in numerical format.
|
|
*/
|
|
public function getGroup() {
|
|
return hphp_splfileinfo_getgroup($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getatime.php )
|
|
*
|
|
* Gets the last access time for the file.
|
|
*
|
|
* @return mixed Returns the time the file was last accessed.
|
|
*/
|
|
public function getATime() {
|
|
return hphp_splfileinfo_getatime($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )
|
|
*
|
|
* Returns the time when the contents of the file were changed. The time
|
|
* returned is a Unix timestamp.
|
|
*
|
|
* @return mixed Returns the last modified time for the file, in a
|
|
* Unix timestamp.
|
|
*/
|
|
public function getMTime() {
|
|
return hphp_splfileinfo_getmtime($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getctime.php )
|
|
*
|
|
* Returns the inode change time for the file. The time returned is a Unix
|
|
* timestamp.
|
|
*
|
|
* @return mixed The last change time, in a Unix timestamp.
|
|
*/
|
|
public function getCTime() {
|
|
return hphp_splfileinfo_getctime($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.gettype.php )
|
|
*
|
|
* Returns the type of the file referenced.
|
|
*
|
|
* @return mixed A string representing the type of the entry. May be
|
|
* one of file, link, or dir
|
|
*/
|
|
public function getType() {
|
|
return hphp_splfileinfo_gettype($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.iswritable.php )
|
|
*
|
|
* Checks if the current entry is writable.
|
|
*
|
|
* @return mixed Returns TRUE if writable, FALSE otherwise;
|
|
*/
|
|
public function isWritable() {
|
|
return hphp_splfileinfo_iswritable($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.isreadable.php )
|
|
*
|
|
* Check if the file is readable.
|
|
*
|
|
* @return mixed Returns TRUE if readable, FALSE otherwise.
|
|
*/
|
|
public function isReadable() {
|
|
return hphp_splfileinfo_isreadable($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.isexecutable.php )
|
|
*
|
|
* Checks if the file is executable.
|
|
*
|
|
* @return mixed Returns TRUE if executable, FALSE otherwise.
|
|
*/
|
|
public function isExecutable() {
|
|
return hphp_splfileinfo_isexecutable($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.isfile.php )
|
|
*
|
|
* Checks if the file referenced by this SplFileInfo object exists and is
|
|
* a regular file.
|
|
*
|
|
* @return mixed Returns TRUE if the file exists and is a regular
|
|
* file (not a link), FALSE otherwise.
|
|
*/
|
|
public function isFile() {
|
|
return hphp_splfileinfo_isfile($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.isdir.php )
|
|
*
|
|
* This method can be used to determine if the file is a directory.
|
|
*
|
|
* @return mixed Returns TRUE if a directory, FALSE otherwise.
|
|
*/
|
|
public function isDir() {
|
|
return hphp_splfileinfo_isdir($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.islink.php )
|
|
*
|
|
* Use this method to check if the file referenced by the SplFileInfo
|
|
* object is a link.
|
|
*
|
|
* @return mixed Returns TRUE if the file is a link, FALSE otherwise.
|
|
*/
|
|
public function isLink() {
|
|
return hphp_splfileinfo_islink($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getlinktarget.php )
|
|
*
|
|
* Gets the target of a filesystem link.
|
|
*
|
|
* The target may not be the real path on the filesystem. Use
|
|
* SplFileInfo::getRealPath() to determine the true path on the filesystem.
|
|
*
|
|
* @return mixed Returns the target of the filesystem link.
|
|
*/
|
|
public function getLinkTarget() {
|
|
return hphp_splfileinfo_getlinktarget($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.getrealpath.php )
|
|
*
|
|
* This method expands all symbolic links, resolves relative references
|
|
* and returns the real path to the file.
|
|
*
|
|
* @return mixed Returns the path to the file.
|
|
*/
|
|
public function getRealPath() {
|
|
return hphp_splfileinfo_getrealpath($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.tostring.php )
|
|
*
|
|
* This method will return the file name of the referenced file.
|
|
*
|
|
* @return mixed Returns the path to the file.
|
|
*/
|
|
public function __toString() {
|
|
return hphp_splfileinfo___tostring($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.openfile.php )
|
|
*
|
|
* Creates an SplFileObject object of the file. This is useful because
|
|
* SplFileObject contains additional methods for manipulating the file
|
|
* whereas SplFileInfo is only useful for gaining information, like whether
|
|
* the file is writable.
|
|
*
|
|
* @mode mixed The mode for opening the file. See the fopen()
|
|
* documentation for descriptions of possible modes.
|
|
* The default is read only.
|
|
* @use_include_path
|
|
* mixed When set to TRUE, the filename is also searched for
|
|
* within the include_path
|
|
* @context mixed Refer to the context section of the manual for a
|
|
* description of contexts.
|
|
*
|
|
* @return mixed The opened file as an SplFileObject object.
|
|
*/
|
|
public function openFile($mode = 'r', $use_include_path = false,
|
|
$context = null) {
|
|
return hphp_splfileinfo_openfile($this, $mode,
|
|
$use_include_path, $context);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.setfileclass.php )
|
|
*
|
|
* Set the class name which SplFileInfo will use to open files with when
|
|
* openFile() is called. The class name passed to this method must be
|
|
* derived from SplFileObject.
|
|
*
|
|
* @class_name mixed The class name to use when openFile() is called.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function setFileClass($class_name = "SplFileObject") {
|
|
hphp_splfileinfo_setfileclass($this, $class_name);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )
|
|
*
|
|
* Use this method to set a custom class which will be used when
|
|
* getFileInfo and getPathInfo are called. The class name passed to this
|
|
* method must be derived from SplFileInfo.
|
|
*
|
|
* @class_name mixed The class name to use.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function setInfoClass($class_name = "SplFileInfo") {
|
|
hphp_splfileinfo_setinfoclass($this, $class_name);
|
|
}
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/class.splfileobject.php )
|
|
*
|
|
* The SplFileObject class offers an object oriented interface for a file.
|
|
*
|
|
*/
|
|
class SplFileObject extends SplFileInfo implements RecursiveIterator,
|
|
Traversable, SeekableIterator {
|
|
|
|
const DROP_NEW_LINE = 1;
|
|
const READ_AHEAD = 2;
|
|
const SKIP_EMPTY = 6;
|
|
const READ_CSV = 8;
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.construct.php )
|
|
*
|
|
* Construct a new file object.
|
|
*
|
|
* @filename mixed The file to read. TipA URL can be used as a filename
|
|
* with this function if the fopen wrappers have been
|
|
* enabled. See fopen() for more details on how to
|
|
* specify the filename. See the Supported Protocols
|
|
* and Wrappers for links to information about what
|
|
* abilities the various wrappers have, notes on their
|
|
* usage, and information on any predefined variables
|
|
* they may provide.
|
|
* @open_mode mixed The mode in which to open the file. See fopen() for
|
|
* a list of allowed modes.
|
|
* @use_include_path
|
|
* mixed Whether to search in the include_path for filename.
|
|
* @context mixed A valid context resource created with
|
|
* stream_context_create().
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function __construct($filename, $open_mode = 'r',
|
|
$use_include_path = false,
|
|
$context = null) {
|
|
hphp_splfileobject___construct($this, $filename, $open_mode,
|
|
$use_include_path, $context);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.current.php )
|
|
*
|
|
* Retrieves the current line of the file.
|
|
*
|
|
* @return mixed Retrieves the current line of the file. If the
|
|
* SplFileObject::READ_CSV flag is set, this method
|
|
* returns an array containing the current line parsed
|
|
* as CSV data.
|
|
*/
|
|
public function current() {
|
|
return hphp_splfileobject_current($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.eof.php )
|
|
*
|
|
* Determine whether the end of file has been reached
|
|
*
|
|
* @return mixed Returns TRUE if file is at EOF, FALSE otherwise.
|
|
*/
|
|
public function eof() {
|
|
return hphp_splfileobject_eof($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fflush.php )
|
|
*
|
|
* Forces a write of all buffered output to the file.
|
|
*
|
|
* @return mixed Returns TRUE on success or FALSE on failure.
|
|
*/
|
|
public function fflush() {
|
|
return hphp_splfileobject_fflush($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fgetc.php )
|
|
*
|
|
* Gets a character from the file.
|
|
*
|
|
* @return mixed Returns a string containing a single character read
|
|
* from the file or FALSE on EOF. WarningThis function
|
|
* may return Boolean FALSE, but may also return a
|
|
* non-Boolean value which evaluates to FALSE. Please
|
|
* read the section on Booleans for more information.
|
|
* Use the === operator for testing the return value of
|
|
* this function.
|
|
*/
|
|
public function fgetc() {
|
|
return hphp_splfileobject_fgetc($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fgetcsv.php )
|
|
*
|
|
* Gets a line from the file which is in CSV format and returns an array
|
|
* containing the fields read.
|
|
*
|
|
* @delimiter mixed The field delimiter (one character only). Defaults
|
|
* as a comma or the value set using
|
|
* SplFileObject::setCsvControl().
|
|
* @enclosure mixed The field enclosure character (one character only).
|
|
* Defaults as a double quotation mark or the value set
|
|
* using SplFileObject::setCsvControl().
|
|
* @escape mixed The escape character (one character only). Defaults
|
|
* as a backslash (\) or the value set using
|
|
* SplFileObject::setCsvControl().
|
|
*
|
|
* @return mixed Returns an indexed array containing the fields read,
|
|
* or FALSE on error.
|
|
*
|
|
* A blank line in a CSV file will be returned as an
|
|
* array comprising a single NULL field unless using
|
|
* SplFileObject::SKIP_EMPTY |
|
|
* SplFileObject::DROP_NEW_LINE, in which case empty
|
|
* lines are skipped.
|
|
*/
|
|
public function fgetcsv($delimiter = ",", $enclosure = "\"",
|
|
$escape = "\\") {
|
|
return hphp_splfileobject_fgetcsv($this, $delimiter,
|
|
$enclosure, $escape);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fgets.php )
|
|
*
|
|
* Gets a line from the file.
|
|
*
|
|
* @return mixed Returns a string containing the next line from the
|
|
* file, or FALSE on error.
|
|
*/
|
|
public function fgets() {
|
|
return hphp_splfileobject_fgets($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fgetss.php )
|
|
*
|
|
* Identical to SplFileObject::fgets(), except that
|
|
* SplFileObject::fgetss() attempts to strip any HTML and PHP tags from the
|
|
* text it reads.
|
|
*
|
|
* @allowable_tags
|
|
* mixed Optional parameter to specify tags which should not
|
|
* be stripped.
|
|
*
|
|
* @return mixed Returns a string containing the next line of the
|
|
* file with HTML and PHP code stripped, or FALSE on
|
|
* error.
|
|
*/
|
|
public function fgetss($allowable_tags) {
|
|
return hphp_splfileobject_fgetss($this, $allowable_tags);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.flock.php )
|
|
*
|
|
* Locks or unlocks the file in the same portable way as flock().
|
|
*
|
|
* @operation mixed operation is one of the following: LOCK_SH to
|
|
* acquire a shared lock (reader). LOCK_EX to acquire
|
|
* an exclusive lock (writer). LOCK_UN to release a
|
|
* lock (shared or exclusive). LOCK_NB to not block
|
|
* while locking (not supported on Windows).
|
|
* @wouldblock mixed Set to TRUE if the lock would block (EWOULDBLOCK
|
|
* errno condition).
|
|
*
|
|
* @return mixed Returns TRUE on success or FALSE on failure.
|
|
*/
|
|
public function flock($operation, &$wouldblock) {
|
|
return hphp_splfileobject_flock($this, $wouldblock);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fpassthru.php )
|
|
*
|
|
* Reads to EOF on the given file pointer from the current position and
|
|
* writes the results to the output buffer.
|
|
*
|
|
* You may need to call SplFileObject::rewind() to reset the file pointer
|
|
* to the beginning of the file if you have already written data to the
|
|
* file.
|
|
*
|
|
* @return mixed Returns the number of characters read from handle
|
|
* and passed through to the output.
|
|
*/
|
|
public function fpassthru() {
|
|
return hphp_splfileobject_fpassthru($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fscanf.php )
|
|
*
|
|
* Reads a line from the file and interprets it according to the specified
|
|
* format, which is described in the documentation for sprintf().
|
|
*
|
|
* Any whitespace in the format string matches any whitespace in the line
|
|
* from the file. This means that even a tab \t in the format string can
|
|
* match a single space character in the input stream.
|
|
*
|
|
* @format mixed The specified format as described in the sprintf()
|
|
* documentation.
|
|
*
|
|
* @return mixed If only one parameter is passed to this method, the
|
|
* values parsed will be returned as an array.
|
|
* Otherwise, if optional parameters are passed, the
|
|
* function will return the number of assigned values.
|
|
* The optional parameters must be passed by reference.
|
|
*/
|
|
public function fscanf($format) {
|
|
$argc = func_num_args();
|
|
$argv = func_get_args();
|
|
return hphp_splfileobject_fscanf($argc, $this, $format, $argv);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fseek.php )
|
|
*
|
|
* Seek to a position in the file measured in bytes from the beginning of
|
|
* the file, obtained by adding offset to the position specified by whence.
|
|
*
|
|
* @offset mixed The offset. A negative value can be used to move
|
|
* backwards through the file which is useful when
|
|
* SEEK_END is used as the whence value.
|
|
* @whence mixed whence values are: SEEK_SET - Set position equal to
|
|
* offset bytes. SEEK_CUR - Set position to current
|
|
* location plus offset. SEEK_END - Set position to
|
|
* end-of-file plus offset.
|
|
*
|
|
* If whence is not specified, it is assumed to be
|
|
* SEEK_SET.
|
|
*
|
|
* @return mixed Returns 0 if the seek was successful, -1 otherwise.
|
|
* Note that seeking past EOF is not considered an
|
|
* error.
|
|
*/
|
|
public function fseek($offset, $whence) {
|
|
return hphp_splfileobject_fseek($this, $offset, $whence);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fstat.php )
|
|
*
|
|
* Gathers the statistics of the file. Behaves identically to fstat().
|
|
*
|
|
* @return mixed Returns an array with the statistics of the file;
|
|
* the format of the array is described in detail on
|
|
* the stat() manual page.
|
|
*/
|
|
public function fstat() {
|
|
return hphp_splfileobject_fstat($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.ftell.php )
|
|
*
|
|
* Returns the position of the file pointer which represents the current
|
|
* offset in the file stream.
|
|
*
|
|
* @return mixed Returns the position of the file pointer as an
|
|
* integer, or FALSE on error.
|
|
*/
|
|
public function ftell() {
|
|
return hphp_splfileobject_ftell($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.ftruncate.php )
|
|
*
|
|
* Truncates the file to size bytes.
|
|
*
|
|
* @size mixed The size to truncate to.
|
|
*
|
|
* If size is larger than the file it is extended with
|
|
* null bytes.
|
|
*
|
|
* If size is smaller than the file, the extra data
|
|
* will be lost.
|
|
*
|
|
* @return mixed Returns TRUE on success or FALSE on failure.
|
|
*/
|
|
public function ftruncate($size) {
|
|
return hphp_splfileobject_ftruncate($this, $size);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.fwrite.php )
|
|
*
|
|
* Writes the contents of string to the file
|
|
*
|
|
* @str mixed The string to be written to the file.
|
|
* @length mixed If the length argument is given, writing will stop
|
|
* after length bytes have been written or the end of
|
|
* string is reached, whichever comes first.
|
|
*
|
|
* @return mixed Returns the number of bytes written, or NULL on
|
|
* error.
|
|
*/
|
|
public function fwrite($str, $length) {
|
|
return hphp_splfileobject_fwrite($this, $str, $length);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.getchildren.php )
|
|
*
|
|
* An SplFileObject does not have children so this method returns NULL.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function getChildren() {
|
|
return null; // An SplFileOjbect does not have children
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.getcsvcontrol.php
|
|
* )
|
|
*
|
|
* Gets the delimiter and enclosure character used for parsing CSV fields.
|
|
*
|
|
* @return mixed Returns an indexed array containing the delimiter
|
|
* and enclosure character.
|
|
*/
|
|
public function getCsvControl() {
|
|
return hphp_splfileobject_getcvscontrol($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.getflags.php )
|
|
*
|
|
* Gets the flags set for an instance of SplFileObject as an integer.
|
|
*
|
|
* @return mixed Returns an integer representing the flags.
|
|
*/
|
|
public function getFlags() {
|
|
return hphp_splfileobject_getflags($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.getmaxlinelen.php
|
|
* )
|
|
*
|
|
* Gets the maximum line length as set by SplFileObject::setMaxLineLen().
|
|
*
|
|
* @return mixed Returns the maximum line length if one has been set
|
|
* with SplFileObject::setMaxLineLen(), default is 0.
|
|
*/
|
|
public function getMaxLineLen() {
|
|
return hphp_splfileobject_getmaxlinelen($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.haschildren.php )
|
|
*
|
|
* An SplFileObject does not have children so this method always return
|
|
* FALSE.
|
|
*
|
|
* @return mixed Returns FALSE
|
|
*/
|
|
public function hasChildren() {
|
|
return false; // An SplFileOjbect does not have children
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.key.php )
|
|
*
|
|
* Gets the current line number.
|
|
*
|
|
* This number may not reflect the actual line number in the file if
|
|
* SplFileObject::setMaxLineLen() is used to read fixed lengths of the
|
|
* file.
|
|
*
|
|
* @return mixed Returns the current line number.
|
|
*/
|
|
public function key() {
|
|
return hphp_splfileobject_key($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.next.php )
|
|
*
|
|
* Moves ahead to the next line in the file.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function next() {
|
|
hphp_splfileobject_next($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.rewind.php )
|
|
*
|
|
* Rewinds the file back to the first line.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function rewind() {
|
|
hphp_splfileobject_rewind($this);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.seek.php )
|
|
*
|
|
* Seek to specified line in the file.
|
|
*
|
|
* @line_pos mixed The zero-based line number to seek to.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function seek($line_pos) {
|
|
hphp_splfileobject_seek($this, $line_pos);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.setcsvcontrol.php
|
|
* )
|
|
*
|
|
* Sets the delimiter and enclosure character for parsing CSV fields.
|
|
*
|
|
* @delimiter mixed The field delimiter (one character only).
|
|
* @enclosure mixed The field enclosure character (one character only).
|
|
* @escape mixed The field escape character (one character only).
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function setCsvControl($delimiter = ",", $enclosure = "\"",
|
|
$escape = "\\") {
|
|
hphp_splfileobject_setcsvcontrol($this, $delimiter, $enclosure, $escape);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.setflags.php )
|
|
*
|
|
* Sets the flags to be used by the SplFileObject.
|
|
*
|
|
* @flags mixed Bit mask of the flags to set. See SplFileObject
|
|
* constants for the available flags.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function setFlags($flags) {
|
|
hphp_splfileobject_setflags($this, $flags);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.setmaxlinelen.php
|
|
* )
|
|
*
|
|
* Sets the maximum length of a line to be read.
|
|
*
|
|
* @max_len mixed The maximum length of a line.
|
|
*
|
|
* @return mixed No value is returned.
|
|
*/
|
|
public function setMaxLineLen($max_len) {
|
|
hphp_splfileobject_setmaxlinelen($this, $max_len);
|
|
}
|
|
|
|
// This doc comment block generated by idl/sysdoc.php
|
|
/**
|
|
* ( excerpt from http://php.net/manual/en/splfileobject.valid.php )
|
|
*
|
|
* Check whether EOF has been reached.
|
|
*
|
|
* @return mixed Returns TRUE if not reached EOF, FALSE otherwise.
|
|
*/
|
|
public function valid() {
|
|
return hphp_splfileobject_valid($this);
|
|
}
|
|
}
|