From a0c8e79f82f8e997d8aa6d652f61bdc45f34c69e Mon Sep 17 00:00:00 2001 From: Brett Bieber Date: Fri, 14 Nov 2008 18:38:21 +0000 Subject: [PATCH] Add start of SplFileInfo docs. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269009 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/spl/splfileinfo.xml | 68 ++++++++++++ reference/spl/splfileinfo/construct.xml | 79 ++++++++++++++ reference/spl/splfileinfo/getatime.xml | 70 ++++++++++++ reference/spl/splfileinfo/getbasename.xml | 97 +++++++++++++++++ reference/spl/splfileinfo/getctime.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getfileinfo.xml | 97 +++++++++++++++++ reference/spl/splfileinfo/getfilename.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getgroup.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getinode.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getlinktarget.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getmtime.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getowner.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getpath.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getpathinfo.xml | 97 +++++++++++++++++ reference/spl/splfileinfo/getpathname.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getperms.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getrealpath.xml | 85 +++++++++++++++ reference/spl/splfileinfo/getsize.xml | 93 ++++++++++++++++ reference/spl/splfileinfo/gettype.xml | 93 ++++++++++++++++ reference/spl/splfileinfo/isdir.xml | 79 ++++++++++++++ reference/spl/splfileinfo/isexecutable.xml | 81 ++++++++++++++ reference/spl/splfileinfo/isfile.xml | 79 ++++++++++++++ reference/spl/splfileinfo/islink.xml | 83 ++++++++++++++ reference/spl/splfileinfo/isreadable.xml | 76 +++++++++++++ reference/spl/splfileinfo/iswritable.xml | 54 +++++++++ reference/spl/splfileinfo/openfile.xml | 115 ++++++++++++++++++++ reference/spl/splfileinfo/setfileclass.xml | 98 +++++++++++++++++ reference/spl/splfileinfo/setinfoclass.xml | 99 +++++++++++++++++ reference/spl/splfileinfo/tostring.xml | 80 ++++++++++++++ 29 files changed, 2473 insertions(+) create mode 100644 reference/spl/splfileinfo.xml create mode 100644 reference/spl/splfileinfo/construct.xml create mode 100644 reference/spl/splfileinfo/getatime.xml create mode 100644 reference/spl/splfileinfo/getbasename.xml create mode 100644 reference/spl/splfileinfo/getctime.xml create mode 100644 reference/spl/splfileinfo/getfileinfo.xml create mode 100644 reference/spl/splfileinfo/getfilename.xml create mode 100644 reference/spl/splfileinfo/getgroup.xml create mode 100644 reference/spl/splfileinfo/getinode.xml create mode 100644 reference/spl/splfileinfo/getlinktarget.xml create mode 100644 reference/spl/splfileinfo/getmtime.xml create mode 100644 reference/spl/splfileinfo/getowner.xml create mode 100644 reference/spl/splfileinfo/getpath.xml create mode 100644 reference/spl/splfileinfo/getpathinfo.xml create mode 100644 reference/spl/splfileinfo/getpathname.xml create mode 100644 reference/spl/splfileinfo/getperms.xml create mode 100644 reference/spl/splfileinfo/getrealpath.xml create mode 100644 reference/spl/splfileinfo/getsize.xml create mode 100644 reference/spl/splfileinfo/gettype.xml create mode 100644 reference/spl/splfileinfo/isdir.xml create mode 100644 reference/spl/splfileinfo/isexecutable.xml create mode 100644 reference/spl/splfileinfo/isfile.xml create mode 100644 reference/spl/splfileinfo/islink.xml create mode 100644 reference/spl/splfileinfo/isreadable.xml create mode 100644 reference/spl/splfileinfo/iswritable.xml create mode 100644 reference/spl/splfileinfo/openfile.xml create mode 100644 reference/spl/splfileinfo/setfileclass.xml create mode 100644 reference/spl/splfileinfo/setinfoclass.xml create mode 100644 reference/spl/splfileinfo/tostring.xml diff --git a/reference/spl/splfileinfo.xml b/reference/spl/splfileinfo.xml new file mode 100644 index 0000000000..9f33edbf27 --- /dev/null +++ b/reference/spl/splfileinfo.xml @@ -0,0 +1,68 @@ + + + + + + The SplFileInfo class + SplFileInfo + + + + +
+ &reftitle.intro; + + The SplFileInfo class offers a high-level object oriented interface to + information for an individual file. + +
+ + +
+ &reftitle.classsynopsis; + + + + SplFileInfo + + + + + SplFileInfo + + + + + Methods + + + + +
+ +
+ + &reference.spl.entities.splfileinfo; + +
+ + diff --git a/reference/spl/splfileinfo/construct.xml b/reference/spl/splfileinfo/construct.xml new file mode 100644 index 0000000000..21ebb1951a --- /dev/null +++ b/reference/spl/splfileinfo/construct.xml @@ -0,0 +1,79 @@ + + + + + + SplFileInfo::__construct + Construct a new SplFileInfo object + + + + &reftitle.description; + + SplFileInfo::__construct + stringfile_name + + + Creates a new SplFileInfo object for the file_name specified. The file + does not need to exist, or be readable. + + + + + &reftitle.parameters; + + + + file_name + + + Path to the file. + + + + + + + + + + &reftitle.examples; + + + <function>SplFileInfo::__construct</function> example + +isFile()) { + echo $info->getRealPath(); +} +?> +]]> + + + + + + + + diff --git a/reference/spl/splfileinfo/getatime.xml b/reference/spl/splfileinfo/getatime.xml new file mode 100644 index 0000000000..5215c313b9 --- /dev/null +++ b/reference/spl/splfileinfo/getatime.xml @@ -0,0 +1,70 @@ + + + + + + SplFileInfo::getATime + Get last access time of the file + + + + &reftitle.description; + + public voidSplFileInfo::getATime + + + + Gets the last access time for the file. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the time the file was last accessed. + + + + + &reftitle.errors; + + Throws RunTimeException on error. + + + + + &reftitle.seealso; + + + fileatime + + + + + + + diff --git a/reference/spl/splfileinfo/getbasename.xml b/reference/spl/splfileinfo/getbasename.xml new file mode 100644 index 0000000000..1dad1c531b --- /dev/null +++ b/reference/spl/splfileinfo/getbasename.xml @@ -0,0 +1,97 @@ + + + + + + SplFileInfo::getBasename + The getBasename purpose + + + + &reftitle.description; + + public voidSplFileInfo::getBasename + stringsuffix + + + The method description goes here. + + + + + &reftitle.parameters; + + + + suffix + + + Description... + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getBasename</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getctime.xml b/reference/spl/splfileinfo/getctime.xml new file mode 100644 index 0000000000..6cb9028a77 --- /dev/null +++ b/reference/spl/splfileinfo/getctime.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getCTime + The getCTime purpose + + + + &reftitle.description; + + public voidSplFileInfo::getCTime + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getCTime</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getfileinfo.xml b/reference/spl/splfileinfo/getfileinfo.xml new file mode 100644 index 0000000000..60ad8fde40 --- /dev/null +++ b/reference/spl/splfileinfo/getfileinfo.xml @@ -0,0 +1,97 @@ + + + + + + SplFileInfo::getFileInfo + The getFileInfo purpose + + + + &reftitle.description; + + public voidSplFileInfo::getFileInfo + stringclass_name + + + The method description goes here. + + + + + &reftitle.parameters; + + + + class_name + + + Description... + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getFileInfo</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getfilename.xml b/reference/spl/splfileinfo/getfilename.xml new file mode 100644 index 0000000000..1ac3104d0f --- /dev/null +++ b/reference/spl/splfileinfo/getfilename.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getFilename + The getFilename purpose + + + + &reftitle.description; + + public voidSplFileInfo::getFilename + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getFilename</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getgroup.xml b/reference/spl/splfileinfo/getgroup.xml new file mode 100644 index 0000000000..0240b9d5f1 --- /dev/null +++ b/reference/spl/splfileinfo/getgroup.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getGroup + The getGroup purpose + + + + &reftitle.description; + + public voidSplFileInfo::getGroup + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getGroup</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getinode.xml b/reference/spl/splfileinfo/getinode.xml new file mode 100644 index 0000000000..b095c7d6ab --- /dev/null +++ b/reference/spl/splfileinfo/getinode.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getInode + The getInode purpose + + + + &reftitle.description; + + public voidSplFileInfo::getInode + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getInode</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getlinktarget.xml b/reference/spl/splfileinfo/getlinktarget.xml new file mode 100644 index 0000000000..ea93c98630 --- /dev/null +++ b/reference/spl/splfileinfo/getlinktarget.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getLinkTarget + The getLinkTarget purpose + + + + &reftitle.description; + + public voidSplFileInfo::getLinkTarget + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getLinkTarget</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getmtime.xml b/reference/spl/splfileinfo/getmtime.xml new file mode 100644 index 0000000000..539ed3058d --- /dev/null +++ b/reference/spl/splfileinfo/getmtime.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getMTime + The getMTime purpose + + + + &reftitle.description; + + public voidSplFileInfo::getMTime + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getMTime</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getowner.xml b/reference/spl/splfileinfo/getowner.xml new file mode 100644 index 0000000000..8ee5886210 --- /dev/null +++ b/reference/spl/splfileinfo/getowner.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getOwner + The getOwner purpose + + + + &reftitle.description; + + public voidSplFileInfo::getOwner + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getOwner</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getpath.xml b/reference/spl/splfileinfo/getpath.xml new file mode 100644 index 0000000000..9ce2450299 --- /dev/null +++ b/reference/spl/splfileinfo/getpath.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getPath + The getPath purpose + + + + &reftitle.description; + + public voidSplFileInfo::getPath + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getPath</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getpathinfo.xml b/reference/spl/splfileinfo/getpathinfo.xml new file mode 100644 index 0000000000..f78c8e59be --- /dev/null +++ b/reference/spl/splfileinfo/getpathinfo.xml @@ -0,0 +1,97 @@ + + + + + + SplFileInfo::getPathInfo + The getPathInfo purpose + + + + &reftitle.description; + + public voidSplFileInfo::getPathInfo + stringclass_name + + + The method description goes here. + + + + + &reftitle.parameters; + + + + class_name + + + Description... + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getPathInfo</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getpathname.xml b/reference/spl/splfileinfo/getpathname.xml new file mode 100644 index 0000000000..645a1448dd --- /dev/null +++ b/reference/spl/splfileinfo/getpathname.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getPathname + The getPathname purpose + + + + &reftitle.description; + + public voidSplFileInfo::getPathname + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getPathname</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getperms.xml b/reference/spl/splfileinfo/getperms.xml new file mode 100644 index 0000000000..3a35364bcc --- /dev/null +++ b/reference/spl/splfileinfo/getperms.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getPerms + The getPerms purpose + + + + &reftitle.description; + + public voidSplFileInfo::getPerms + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getPerms</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getrealpath.xml b/reference/spl/splfileinfo/getrealpath.xml new file mode 100644 index 0000000000..7cfd1fe346 --- /dev/null +++ b/reference/spl/splfileinfo/getrealpath.xml @@ -0,0 +1,85 @@ + + + + + + SplFileInfo::getRealPath + The getRealPath purpose + + + + &reftitle.description; + + public voidSplFileInfo::getRealPath + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::getRealPath</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/getsize.xml b/reference/spl/splfileinfo/getsize.xml new file mode 100644 index 0000000000..48f38979a9 --- /dev/null +++ b/reference/spl/splfileinfo/getsize.xml @@ -0,0 +1,93 @@ + + + + + + SplFileInfo::getSize + Get the size of the file + + + + &reftitle.description; + + public voidSplFileInfo::getSize + + + + Returns the filesize in bytes for the file referenced. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The filesize in bytes. + + + + + &reftitle.errors; + + If the file does not exist a RuntimeException will be thrown. + + + + + + &reftitle.examples; + + + <function>SplFileInfo::getSize</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/gettype.xml b/reference/spl/splfileinfo/gettype.xml new file mode 100644 index 0000000000..0b2dd31b59 --- /dev/null +++ b/reference/spl/splfileinfo/gettype.xml @@ -0,0 +1,93 @@ + + + + + + SplFileInfo::getType + Get the entry's file type. + + + + &reftitle.description; + + public voidSplFileInfo::getType + + + + Returns the type of the file referenced. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + A string representing the type of the entry. + May be one of file, link, + or dir + + + + + &reftitle.errors; + + Throws a RuntimeException on error. + + + + + + &reftitle.examples; + + + <function>SplFileInfo::getType</function> example + +getType().PHP_EOL; + +$info = new SplFileInfo(dirname(__FILE__)); +echo $info->getType(); + +?> +]]> + + &example.outputs.similar; + + + + + + + + + + diff --git a/reference/spl/splfileinfo/isdir.xml b/reference/spl/splfileinfo/isdir.xml new file mode 100644 index 0000000000..5a4644e395 --- /dev/null +++ b/reference/spl/splfileinfo/isdir.xml @@ -0,0 +1,79 @@ + + + + + + SplFileInfo::isDir + Check if the file is a directory + + + + &reftitle.description; + + public voidSplFileInfo::isDir + + + + This method can be used to determine if the file is a directory. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if a directory, &false; otherwise. + + + + + &reftitle.examples; + + + <function>SplFileInfo::isDir</function> example + +isDir()); + +$d = new SplFileInfo(__FILE__); +var_dump($d->isDir()); +?> +]]> + + &example.outputs.similar; + + + + + + + + + + diff --git a/reference/spl/splfileinfo/isexecutable.xml b/reference/spl/splfileinfo/isexecutable.xml new file mode 100644 index 0000000000..467af3fa9d --- /dev/null +++ b/reference/spl/splfileinfo/isexecutable.xml @@ -0,0 +1,81 @@ + + + + + + SplFileInfo::isExecutable + Check if the file is executable + + + + &reftitle.description; + + public voidSplFileInfo::isExecutable + + + + The method description goes here. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if executable, &false; otherwise. + + + + + &reftitle.examples; + + + <function>SplFileInfo::isExecutable</function> example + +isExecutable()); +$d = new SplFileInfo('/usr/bin'); +var_dump($d->isExecutable()); +$d = new SplFileInfo('foo'); +var_dump($d->isExecutable()); +?> +]]> + + &example.outputs.similar; + + + + + + + + + + diff --git a/reference/spl/splfileinfo/isfile.xml b/reference/spl/splfileinfo/isfile.xml new file mode 100644 index 0000000000..b90a3206de --- /dev/null +++ b/reference/spl/splfileinfo/isfile.xml @@ -0,0 +1,79 @@ + + + + + + SplFileInfo::isFile + Check if the object references a regular file + + + + &reftitle.description; + + public voidSplFileInfo::isFile + + + + Checks if the file referenced by this SplFileInfo object exists and is a regular file. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if the file exists and is a regular file (not a link), &false; otherwise. + + + + + &reftitle.examples; + + + <function>SplFileInfo::isFile</function> example + +isFile()); + +$d = new SplFileInfo(dirname(__FILE__)); +var_dump($d->isFile()); +?> +]]> + + &example.outputs.similar; + + + + + + + + + + diff --git a/reference/spl/splfileinfo/islink.xml b/reference/spl/splfileinfo/islink.xml new file mode 100644 index 0000000000..b50a606e5f --- /dev/null +++ b/reference/spl/splfileinfo/islink.xml @@ -0,0 +1,83 @@ + + + + + + SplFileInfo::isLink + Check if the file is a link + + + + &reftitle.description; + + public voidSplFileInfo::isLink + + + + Use this method to check if the file referenced by the SplFileInfo object + is a link. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if the file is a link, &false; otherwise. + + + + + &reftitle.examples; + + + <function>SplFileInfo::isLink</function> example + +isLink()) { + echo 'The real path is '.$info->getRealPath(); +} +?> +]]> + + + + + + + &reftitle.seealso; + + + SplFileInfo::getRealPath + + + + + + + diff --git a/reference/spl/splfileinfo/isreadable.xml b/reference/spl/splfileinfo/isreadable.xml new file mode 100644 index 0000000000..3a6147fc6f --- /dev/null +++ b/reference/spl/splfileinfo/isreadable.xml @@ -0,0 +1,76 @@ + + + + + + SplFileInfo::isReadable + Check if file is readable + + + + &reftitle.description; + + public voidSplFileInfo::isReadable + + + + Check if the file is readable. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if readable, &false; otherwise. + + + + + &reftitle.examples; + + + <function>SplFileInfo::isReadable</function> example + +isReadable()); $d = new SplFileInfo('foo'); var_dump($d->isReadable()); +?> +]]> + + &example.outputs.similar; + + + + + + + + + + diff --git a/reference/spl/splfileinfo/iswritable.xml b/reference/spl/splfileinfo/iswritable.xml new file mode 100644 index 0000000000..f0342a5b38 --- /dev/null +++ b/reference/spl/splfileinfo/iswritable.xml @@ -0,0 +1,54 @@ + + + + + + SplFileInfo::isWritable + Check if the entry is writeable + + + + &reftitle.description; + + public voidSplFileInfo::isWritable + + + + Checks if the current entry is writeable. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns &true; if writeable, &false; otherwise; + + + + + + diff --git a/reference/spl/splfileinfo/openfile.xml b/reference/spl/splfileinfo/openfile.xml new file mode 100644 index 0000000000..5c6abdd37f --- /dev/null +++ b/reference/spl/splfileinfo/openfile.xml @@ -0,0 +1,115 @@ + + + + + + SplFileInfo::openFile + The openFile purpose + + + + &reftitle.description; + + public voidSplFileInfo::openFile + stringopen_mode + stringuse_include_path + stringcontext + + + The method description goes here. + + + + + &reftitle.parameters; + + + + open_mode + + + Description... + + + + + use_include_path + + + Description... + + + + + context + + + Description... + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::openFile</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/setfileclass.xml b/reference/spl/splfileinfo/setfileclass.xml new file mode 100644 index 0000000000..8b1fe61689 --- /dev/null +++ b/reference/spl/splfileinfo/setfileclass.xml @@ -0,0 +1,98 @@ + + + + + + SplFileInfo::setFileClass + Set the class name used with SplFileInfo::openFile() + + + + &reftitle.description; + + public voidSplFileInfo::setFileClass + stringclass_name + + + 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. + + + + + &reftitle.parameters; + + + + class_name + + + The class name to be used when openFile() is called. + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::setFileClass</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + SplFileInfo::openFile + + + + + + + diff --git a/reference/spl/splfileinfo/setinfoclass.xml b/reference/spl/splfileinfo/setinfoclass.xml new file mode 100644 index 0000000000..5254c6108e --- /dev/null +++ b/reference/spl/splfileinfo/setinfoclass.xml @@ -0,0 +1,99 @@ + + + + + + SplFileInfo::setInfoClass + Set the class used with getFileInfo and getPathInfo + + + + &reftitle.description; + + public voidSplFileInfo::setInfoClass + stringclass_name + + + 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. + + + + + &reftitle.parameters; + + + + class_name + + + The class name to be used. + + + + + + + + + + &reftitle.returnvalues; + + Description... + + + + + &reftitle.examples; + + + <function>SplFileInfo::setInfoClass</function> example + + +]]> + + &example.outputs.similar; + + + + + + + + + &reftitle.seealso; + + + Classname::Method + + + + + + + diff --git a/reference/spl/splfileinfo/tostring.xml b/reference/spl/splfileinfo/tostring.xml new file mode 100644 index 0000000000..f6511b1a07 --- /dev/null +++ b/reference/spl/splfileinfo/tostring.xml @@ -0,0 +1,80 @@ + + + + + + SplFileInfo::__toString + Returns the path to the file as a string + + + + &reftitle.description; + + public voidSplFileInfo::__toString + + + + This method will return the file name of the referenced file. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the path to the file. + + + + + &reftitle.examples; + + + <function>SplFileInfo::__toString</function> example + +__toString().PHP_EOL; +$info = SplFileInfo('/usr/bin/php'); +echo $info->__toString(); +?> +]]> + + &example.outputs.similar; + + + + + + + + + +