src/Panda/Storage/Adapters/Filesystem.php
public function put($path, $contents, $lock = false)
    {
        // Check if folder exists
        if (!$this->exists(dirname($path))) {
            mkdir(dirname($path), 0775, true);
        }

        return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    }
public function put($path, $contents, $lock = false)
    {
        // Check if folder exists
        if (!$this->exists(dirname($path))) {
            mkdir(dirname($path), 0775, true);
        }

        return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
    }
public function put ( $ path , $ contents , $ lock = false ) { // Check if folder exists if ( ! $ this -> exists ( dirname ( $ path ) ) ) { mkdir ( dirname ( $ path ) , 0775 , true ) ; } return file_put_contents ( $ path , $ contents , $ lock ? LOCK_EX : 0 ) ; }
Put contents to a given file. Create the file if doesn't exist.

@param string $path     The file's path to put contents to.
@param string $contents The file's contents.
@param bool   $lock     Acquire an exclusive lock on the file while proceeding to the writing.

@return mixed The number of bytes that were written to the file, or False on failure.
Put contents to a given file . Create the file if doesn t exist .