[BUGFIX] Re-introduce read-only file mounts
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Resource / FolderInterface.php
1 <?php
2 namespace TYPO3\CMS\Core\Resource;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16 /**
17 * Interface for folders
18 *
19 * @author Andreas Wolf <andreas.wolf@typo3.org>
20 */
21 interface FolderInterface extends ResourceInterface
22 {
23 /**
24 * Roles for folders
25 */
26 const ROLE_DEFAULT = 'default';
27 const ROLE_RECYCLER = 'recycler';
28 const ROLE_PROCESSING = 'processing';
29 const ROLE_TEMPORARY = 'temporary';
30 const ROLE_USERUPLOAD = 'userupload';
31 const ROLE_MOUNT = 'mount';
32 const ROLE_READONLY_MOUNT = 'readonly-mount';
33 const ROLE_USER_MOUNT = 'user-mount';
34
35 /**
36 * Returns a list of all subfolders
37 *
38 * @return Folder[]
39 */
40 public function getSubfolders();
41
42 /**
43 * Returns the object for a subfolder of the current folder, if it exists.
44 *
45 * @param string $name Name of the subfolder
46 * @return Folder
47 */
48 public function getSubfolder($name);
49
50 /**
51 * Checks if a folder exists in this folder.
52 *
53 * @param string $name
54 * @return boolean
55 */
56 public function hasFolder($name);
57
58 /**
59 * Checks if a file exists in this folder
60 *
61 * @param string $name
62 * @return boolean
63 */
64 public function hasFile($name);
65
66 /**
67 * Renames this folder.
68 *
69 * @param string $newName
70 * @return Folder
71 */
72 public function rename($newName);
73
74 /**
75 * Deletes this folder from its storage. This also means that this object becomes useless.
76 *
77 * @return boolean TRUE if deletion succeeded
78 */
79 public function delete();
80
81 }