Initial xentral_oss_20.3.c9ffacf
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace Xentral\Components\Filesystem\Adapter;
|
||||
|
||||
interface AdapterInterface extends ReaderAdapterInterface
|
||||
{
|
||||
/**
|
||||
* Creates a new file
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $contents
|
||||
* @param array $config
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function write($path, $contents, array $config = []);
|
||||
|
||||
/**
|
||||
* Creates a new file using a stream
|
||||
*
|
||||
* @param string $path
|
||||
* @param resource $resource
|
||||
* @param array $config
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function writeStream($path, $resource, array $config = []);
|
||||
|
||||
/**
|
||||
* Updates an existing file
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $contents
|
||||
* @param array $config
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function update($path, $contents, array $config = []);
|
||||
|
||||
/**
|
||||
* Updates an existing file using a stream
|
||||
*
|
||||
* @param string $path
|
||||
* @param resource $resource
|
||||
* @param array $config
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function updateStream($path, $resource, array $config = []);
|
||||
|
||||
/**
|
||||
* Renames a file
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $newpath
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function rename($path, $newpath);
|
||||
|
||||
/**
|
||||
* Copies a file to new location
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $newpath
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function copy($path, $newpath);
|
||||
|
||||
/**
|
||||
* Deletes a single file
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete($path);
|
||||
|
||||
/**
|
||||
* Deletes a directory and its contents
|
||||
*
|
||||
* @param string $directory
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteDir($directory);
|
||||
|
||||
/**
|
||||
* @param string $directory
|
||||
* @param array $config
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function createDir($directory, array $config = []);
|
||||
}
|
||||
Reference in New Issue
Block a user