File indexing completed on 2024-11-24 05:19:04

0001 <?php
0002 /**
0003  * file server - part of Opendesktop.org platform project <https://www.opendesktop.org>.
0004  *
0005  * Copyright (c) 2016 pling GmbH.
0006  *
0007  * This program is free software: you can redistribute it and/or modify
0008  * it under the terms of the GNU Affero General Public License as
0009  * published by the Free Software Foundation, either version 3 of the
0010  * License, or (at your option) any later version.
0011  *
0012  * This program is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015  * GNU Affero General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Affero General Public License
0018  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
0019  */
0020 
0021 namespace Ocs\Storage;
0022 
0023 interface AdapterInterface
0024 {
0025     /**
0026      * @param string $from
0027      * @param string $to
0028      *
0029      * @return bool
0030      */
0031     public function moveUploadedFile(string $from, string $to): bool;
0032 
0033     public function fixFilename(string $name, string $collectionPath): string;
0034 
0035     public function prepareCollectionPath(string $collectionName, string $filePath): bool;
0036 
0037     public function testAndCreate(string $dir): bool;
0038 
0039     public function moveFile($from, $to): bool;
0040 
0041     public function copyFile($from, $to): bool;
0042 
0043     public function isFile($from): bool;
0044 
0045 }