public function create(array $metadata = array())
    {
        if (is_file($this->file)) {
            return false;
        }

        $this->createTemporaryFolder();
        file_put_contents($this->file, $this->placeholderContent($metadata), LOCK_EX);

        return true;
    }
public function create(array $metadata = array())
    {
        if (is_file($this->file)) {
            return false;
        }

        $this->createTemporaryFolder();
        file_put_contents($this->file, $this->placeholderContent($metadata), LOCK_EX);

        return true;
    }
public function create ( array $ metadata = array ( ) ) { if ( is_file ( $ this -> file ) ) { return false ; } $ this -> createTemporaryFolder ( ) ; file_put_contents ( $ this -> file , $ this -> placeholderContent ( $ metadata ) , LOCK_EX ) ; return true ; }
Creates the file. It creates a placeholder file with some metadata on it and will
create all the temporary files and folders.

Writing without creating first will throw an exception. Creating twice will not throw an
exception but will return false. That means it is OK to call `create()` before calling
`write()`. Ideally it should be called once when the writing of the file is initialized.

@param array $metadata

@return bool
Creates the file . It creates a placeholder file with some metadata on it and will create all the temporary files and folders .