File : @return correctely typed
This commit is contained in:
24
src/File.php
24
src/File.php
@@ -131,7 +131,7 @@ class File
|
|||||||
|
|
||||||
/** Chroot in the provided directory
|
/** Chroot in the provided directory
|
||||||
* @param string $directory The directory to chroot
|
* @param string $directory The directory to chroot
|
||||||
* @return true if the chroot is done, false if there is a failure
|
* @return boolean true if the chroot is done, false if there is a failure
|
||||||
* @throws If directory not exists, or the directory is not executable
|
* @throws If directory not exists, or the directory is not executable
|
||||||
*/
|
*/
|
||||||
public function chroot ($directory)
|
public function chroot ($directory)
|
||||||
@@ -232,7 +232,7 @@ class File
|
|||||||
* @param string $filename Path to the file where to write the data
|
* @param string $filename Path to the file where to write the data
|
||||||
* @param string $data The data to write
|
* @param string $data The data to write
|
||||||
* @param integer|null $flags The optional flags
|
* @param integer|null $flags The optional flags
|
||||||
* @return the length of the data stored
|
* @return integer the length of the data stored
|
||||||
* @throws If parent directory not exists, is not writeable, or the file
|
* @throws If parent directory not exists, is not writeable, or the file
|
||||||
* exists and is not writeable
|
* exists and is not writeable
|
||||||
*/
|
*/
|
||||||
@@ -260,9 +260,9 @@ class File
|
|||||||
|
|
||||||
/** Get the file modification time of a file
|
/** Get the file modification time of a file
|
||||||
* @param string $filename Path to the file
|
* @param string $filename Path to the file
|
||||||
* @return the time the file was last modified, or FALSE on failure. The
|
* @return integer|boolean the time the file was last modified, or FALSE
|
||||||
* time is returned as a Unix timestamp, which is suitable for the date()
|
* on failure. The time is returned as a Unix timestamp, which is suitable
|
||||||
* function.
|
* for the date() function.
|
||||||
* @throws If parent directory not exists, is not writeable
|
* @throws If parent directory not exists, is not writeable
|
||||||
*/
|
*/
|
||||||
public function filemtime ($filename)
|
public function filemtime ($filename)
|
||||||
@@ -277,7 +277,7 @@ class File
|
|||||||
|
|
||||||
/** Get the file size
|
/** Get the file size
|
||||||
* @param string $filename Path to the file
|
* @param string $filename Path to the file
|
||||||
* @return the size of the file or FALSE on failure.
|
* @return integer|boolean the size of the file or FALSE on failure.
|
||||||
* @throws If parent directory not exists, is not writeable
|
* @throws If parent directory not exists, is not writeable
|
||||||
*/
|
*/
|
||||||
public function filesize ($filename)
|
public function filesize ($filename)
|
||||||
@@ -292,7 +292,7 @@ class File
|
|||||||
|
|
||||||
/** Get the file info of the provided filename
|
/** Get the file info of the provided filename
|
||||||
* @param string $filename Path to the file
|
* @param string $filename Path to the file
|
||||||
* @return the mimetype of the file
|
* @return string the mimetype of the file
|
||||||
* @throws If parent directory not exists, is not writeable
|
* @throws If parent directory not exists, is not writeable
|
||||||
*/
|
*/
|
||||||
public function fileinfoMimeType ($filename)
|
public function fileinfoMimeType ($filename)
|
||||||
@@ -515,7 +515,7 @@ class File
|
|||||||
|
|
||||||
/** Calculate the md5 sum of a file
|
/** Calculate the md5 sum of a file
|
||||||
* @param string $filename The file to hash
|
* @param string $filename The file to hash
|
||||||
* @return the calulated hash
|
* @return string the calulated hash
|
||||||
* @throws If the file doesn't exists
|
* @throws If the file doesn't exists
|
||||||
*/
|
*/
|
||||||
public function md5_file ($filename)
|
public function md5_file ($filename)
|
||||||
@@ -781,7 +781,7 @@ class File
|
|||||||
|
|
||||||
/** Calculate the sha1 sum of a file
|
/** Calculate the sha1 sum of a file
|
||||||
* @param string $filename The file to hash
|
* @param string $filename The file to hash
|
||||||
* @return the calulated hash
|
* @return string the calulated hash
|
||||||
* @throws If the file doesn't exists
|
* @throws If the file doesn't exists
|
||||||
*/
|
*/
|
||||||
public function sha1_file ($filename)
|
public function sha1_file ($filename)
|
||||||
@@ -849,8 +849,8 @@ class File
|
|||||||
* Must use the filesystem path (complete) and not the version in chroot.
|
* Must use the filesystem path (complete) and not the version in chroot.
|
||||||
* The last directoy must be executable and readable (no test for writeable)
|
* The last directoy must be executable and readable (no test for writeable)
|
||||||
* @param string $path The directory path to check
|
* @param string $path The directory path to check
|
||||||
* @return true if the path is executable for all the parents and for the
|
* @return boolean true if the path is executable for all the parents and
|
||||||
* last directory
|
* for the last directory
|
||||||
* @throws if there is a missing part, or a parent is not executable
|
* @throws if there is a missing part, or a parent is not executable
|
||||||
*/
|
*/
|
||||||
private function checkPathRO ($path)
|
private function checkPathRO ($path)
|
||||||
@@ -967,7 +967,7 @@ class File
|
|||||||
* @param integer $prio The message priority. Should be higher than
|
* @param integer $prio The message priority. Should be higher than
|
||||||
* $this->debug to save the message
|
* $this->debug to save the message
|
||||||
* @param string $message The message to save
|
* @param string $message The message to save
|
||||||
* @return null;
|
* @return null
|
||||||
*/
|
*/
|
||||||
private function debug ($prio, $message)
|
private function debug ($prio, $message)
|
||||||
// {{{
|
// {{{
|
||||||
|
|||||||
Reference in New Issue
Block a user