aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files/SimpleFS/ISimpleRoot.php
blob: 5c01c6a2a2e8d0b7160b0b91c1c596715dd5b13b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
 * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\Files\SimpleFS;

use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;

/**
 * Interface ISimpleRoot
 *
 * @since 11.0.0
 */
interface ISimpleRoot {
	/**
	 * Get the folder with name $name
	 *
	 * @throws NotFoundException
	 * @throws \RuntimeException
	 * @since 11.0.0
	 */
	public function getFolder(string $name): ISimpleFolder;

	/**
	 * Get all the Folders
	 *
	 * @return ISimpleFolder[]
	 * @throws NotFoundException
	 * @throws \RuntimeException
	 * @since 11.0.0
	 */
	public function getDirectoryListing(): array;

	/**
	 * Create a new folder named $name
	 *
	 * @throws NotPermittedException
	 * @throws \RuntimeException
	 * @since 11.0.0
	 */
	public function newFolder(string $name): ISimpleFolder;
}