Skip to content

Commit

Permalink
move method
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 29, 2016
1 parent 2a8f5be commit d5ff607
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/Illuminate/Filesystem/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,6 @@ public function put($path, $contents, $lock = false)
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
}

/**
* Get or set UNIX mode of a file or directory.
*
* @param string $path
* @param int $mode
* @return mixed
*/
public function chmod($path, $mode = null)
{
if ($mode) {
return chmod($path, $mode);
}

return substr(sprintf('%o', fileperms($path)), -4);
}

/**
* Prepend to a file.
*
Expand Down Expand Up @@ -155,6 +139,22 @@ public function append($path, $data)
return file_put_contents($path, $data, FILE_APPEND);
}

/**
* Get or set UNIX mode of a file or directory.
*
* @param string $path
* @param int $mode
* @return mixed
*/
public function chmod($path, $mode = null)
{
if ($mode) {
return chmod($path, $mode);
}

return substr(sprintf('%o', fileperms($path)), -4);
}

/**
* Delete the file at a given path.
*
Expand Down

0 comments on commit d5ff607

Please sign in to comment.