Skip to content

Commit

Permalink
Additional grammatical corrections to File utility
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Crowe committed Oct 4, 2013
1 parent 79c3336 commit c729b56
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions lib/Cake/Utility/File.php
Expand Up @@ -28,15 +28,15 @@
class File {

/**
* Folder object of the File
* Folder object of the file
*
* @var Folder
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::$Folder
*/
public $Folder = null;

/**
* Filename
* File name
*
* @var string
* http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::$name
Expand Down Expand Up @@ -103,7 +103,7 @@ public function __destruct() {
}

/**
* Creates the File.
* Creates the file.
*
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::create
Expand Down Expand Up @@ -144,7 +144,7 @@ public function open($mode = 'r', $force = false) {
}

/**
* Return the contents of this File as a string.
* Return the contents of this file as a string.
*
* @param string $bytes where to start
* @param string $mode A `fread` compatible mode.
Expand Down Expand Up @@ -200,8 +200,8 @@ public function offset($offset = false, $seek = SEEK_SET) {
}

/**
* Prepares a ascii string for writing. Converts line endings to the
* correct terminator for the current platform. If windows "\r\n" will be used
* Prepares a ASCII string for writing. Converts line endings to the
* correct terminator for the current platform. If Windows, "\r\n" will be used,
* all other platforms will use "\n"
*
* @param string $data Data to prepare for writing.
Expand All @@ -218,11 +218,11 @@ public static function prepare($data, $forceWindows = false) {
}

/**
* Write given data to this File.
* Write given data to this file.
*
* @param string $data Data to write to this File.
* @param string $mode Mode of writing. {@link http://php.net/fwrite See fwrite()}.
* @param string $force force the file to open
* @param string $force Force the file to open
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::write
*/
Expand All @@ -246,10 +246,10 @@ public function write($data, $mode = 'w', $force = false) {
}

/**
* Append given data string to this File.
* Append given data string to this file.
*
* @param string $data Data to write
* @param string $force force the file to open
* @param string $force Force the file to open
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::append
*/
Expand All @@ -271,7 +271,7 @@ public function close() {
}

/**
* Deletes the File.
* Deletes the file.
*
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::delete
Expand All @@ -288,7 +288,7 @@ public function delete() {
}

/**
* Returns the File info as an array with the following keys:
* Returns the file info as an array with the following keys:
*
* - dirname
* - basename
Expand Down Expand Up @@ -317,9 +317,9 @@ public function info() {
}

/**
* Returns the File extension.
* Returns the file extension.
*
* @return string The File extension
* @return string The file extension
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::ext
*/
public function ext() {
Expand All @@ -333,9 +333,9 @@ public function ext() {
}

/**
* Returns the File name without extension.
* Returns the file name without extension.
*
* @return string The File name without extension.
* @return string The file name without extension.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::name
*/
public function name() {
Expand All @@ -351,11 +351,11 @@ public function name() {
}

/**
* makes filename safe for saving
* Makes file name safe for saving
*
* @param string $name The name of the file to make safe if different from $this->name
* @param string $ext The name of the extension to make safe if different from $this->ext
* @return string $ext the extension of the file
* @return string $ext The extension of the file
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::safe
*/
public function safe($name = null, $ext = null) {
Expand Down Expand Up @@ -389,9 +389,9 @@ public function md5($maxsize = 5) {
}

/**
* Returns the full path of the File.
* Returns the full path of the file.
*
* @return string Full path to file
* @return string Full path to the file
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::pwd
*/
public function pwd() {
Expand All @@ -402,9 +402,9 @@ public function pwd() {
}

/**
* Returns true if the File exists.
* Returns true if the file exists.
*
* @return boolean true if it exists, false otherwise
* @return boolean True if it exists, false otherwise
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::exists
*/
public function exists() {
Expand All @@ -413,7 +413,7 @@ public function exists() {
}

/**
* Returns the "chmod" (permissions) of the File.
* Returns the "chmod" (permissions) of the file.
*
* @return string|false Permissions for the file, or false in case of an error
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::perms
Expand All @@ -426,9 +426,9 @@ public function perms() {
}

/**
* Returns the Filesize
* Returns the file size
*
* @return integer|false size of the file in bytes, or false in case of an error
* @return integer|false Size of the file in bytes, or false in case of an error
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::size
*/
public function size() {
Expand All @@ -439,9 +439,9 @@ public function size() {
}

/**
* Returns true if the File is writable.
* Returns true if the file is writable.
*
* @return boolean true if its writable, false otherwise
* @return boolean True if it's writable, false otherwise
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::writable
*/
public function writable() {
Expand All @@ -451,27 +451,27 @@ public function writable() {
/**
* Returns true if the File is executable.
*
* @return boolean true if its executable, false otherwise
* @return boolean Rrue if it's executable, false otherwise
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::executable
*/
public function executable() {
return is_executable($this->path);
}

/**
* Returns true if the File is readable.
* Returns true if the file is readable.
*
* @return boolean true if file is readable, false otherwise
* @return boolean True if file is readable, false otherwise
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::readable
*/
public function readable() {
return is_readable($this->path);
}

/**
* Returns the File's owner.
* Returns the file's owner.
*
* @return integer|false the Fileowner, or false in case of an error
* @return integer|false The file owner, or false in case of an error
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::owner
*/
public function owner() {
Expand All @@ -482,9 +482,9 @@ public function owner() {
}

/**
* Returns the File's group.
* Returns the file's group.
*
* @return integer|false the Filegroup, or false in case of an error
* @return integer|false The file group, or false in case of an error
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::group
*/
public function group() {
Expand Down Expand Up @@ -533,7 +533,7 @@ public function folder() {
/**
* Copy the File to $dest
*
* @param string $dest destination for the copy
* @param string $dest Destination for the copy
* @param boolean $overwrite Overwrite $dest if exists
* @return boolean Success
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::copy
Expand Down Expand Up @@ -573,7 +573,7 @@ public function mime() {
/**
* Clear PHP's internal stat cache
*
* For 5.3 onwards its possible to clear cache for just a single file. Passing true
* For 5.3 onwards it's possible to clear cache for just a single file. Passing true
* will clear all the stat cache.
*
* @param boolean $all Clear all cache or not
Expand Down

0 comments on commit c729b56

Please sign in to comment.