* This file is licensed under the Affero General Public License version 3 or * later. * See the COPYING-README file. */ namespace Icewind\SMB; interface IShare { public function connect(); /** * Create a folder on the share * * @param string $path * @return bool */ public function mkdir($path); /** * Download a remote file * * @param string $source remove file * @param string $target local file * @return bool */ public function get($source, $target); /** * Rename a remote file * * @param string $from * @param string $to * @return bool */ public function rename($from, $to); /** * Get the name of the share * * @return string */ public function getName(); /** * Upload a local file * * @param string $source local file * @param string $target remove file * @return bool */ public function put($source, $target); /** * @return Server */ public function getServer(); /** * List the content of a remote folder * * Returns a nested array in the format of * [ * $name => [ * 'size' => $size, * 'type' => $type, * 'time' => $mtime * ], * ... * ] * * @param $path * @return array[] */ public function dir($path); /** * Remove a folder on the share * * @param string $path * @return bool */ public function rmdir($path); /** * Delete a file on the share * * @param string $path * @return bool */ public function del($path); /** * Open a readable stream top a remote file * * @param string $source * @return resource a read only stream with the contents of the remote file */ public function read($source); }