Skip to content

Commit

Permalink
Remove readBase64() from File utility, since it is not commonly used.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillerdesign committed May 20, 2013
1 parent 987c018 commit b42a2d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -1386,7 +1386,7 @@ protected function _attachFiles($boundary = null) {
*/
protected function _readFile($path) {
$File = new File($path);
return $File->readBase64();
return chunk_split(base64_encode($File->read()));
}

/**
Expand Down
11 changes: 0 additions & 11 deletions lib/Cake/Utility/File.php
Expand Up @@ -180,17 +180,6 @@ public function read($bytes = false, $mode = 'rb', $force = false) {
return trim($data);
}

/**
* Return the contents of this File as a base64 version of the file contents.
* The string is split into smaller chunks to match RFC 2045 semantics.
*
* @return string File contents in base64 encoding
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::readBase64
*/
public function readBase64() {
return chunk_split(base64_encode($this->read()));
}

/**
* Sets or gets the offset for the currently opened file.
*
Expand Down

0 comments on commit b42a2d4

Please sign in to comment.