public function write(string $file, string $contents): DirectoryInterface
    {
        $this->filesystem->write("{$this->directory}/{$file}", $contents);

        return $this;
    }
public function write(string $file, string $contents): DirectoryInterface
    {
        $this->filesystem->write("{$this->directory}/{$file}", $contents);

        return $this;
    }
public function write ( string $ file , string $ contents ) : DirectoryInterface { $ this -> filesystem -> write ( "{$this->directory}/{$file}" , $ contents ) ; return $ this ; }
Write data to a file.

@param string $file The path to the file
@param string $contents The contents to write to the file

@return $this
Write data to a file .