src/File.php
public function create()
    {
        if (! $this->adapter->fileExists($this->path, true)) {
            // ensure the parent directory exists
            new Directory(dirname($this->path), $this->adapter);

            if ($this->adapter->createFile($this->path) === false) {
                $this->throwUnableToCreate();
            }
        }

        return $this;
    }
public function create()
    {
        if (! $this->adapter->fileExists($this->path, true)) {
            // ensure the parent directory exists
            new Directory(dirname($this->path), $this->adapter);

            if ($this->adapter->createFile($this->path) === false) {
                $this->throwUnableToCreate();
            }
        }

        return $this;
    }
public function create ( ) { if ( ! $ this -> adapter -> fileExists ( $ this -> path , true ) ) { // ensure the parent directory exists new Directory ( dirname ( $ this -> path ) , $ this -> adapter ) ; if ( $ this -> adapter -> createFile ( $ this -> path ) === false ) { $ this -> throwUnableToCreate ( ) ; } } return $ this ; }
Creates the file if it doesn't exist.

@return self
Creates the file if it doesn t exist .