xref: /webtrees/app/Contracts/FilesystemFactoryInterface.php (revision d11be7027e34e3121be11cc025421873364403f9)
169675509SGreg Roach<?php
269675509SGreg Roach
369675509SGreg Roach/**
469675509SGreg Roach * webtrees: online genealogy
5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
669675509SGreg Roach * This program is free software: you can redistribute it and/or modify
769675509SGreg Roach * it under the terms of the GNU General Public License as published by
869675509SGreg Roach * the Free Software Foundation, either version 3 of the License, or
969675509SGreg Roach * (at your option) any later version.
1069675509SGreg Roach * This program is distributed in the hope that it will be useful,
1169675509SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1269675509SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1369675509SGreg Roach * GNU General Public License for more details.
1469675509SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
1669675509SGreg Roach */
1769675509SGreg Roach
1869675509SGreg Roachdeclare(strict_types=1);
1969675509SGreg Roach
2069675509SGreg Roachnamespace Fisharebest\Webtrees\Contracts;
2169675509SGreg Roach
22f7cf8a15SGreg Roachuse League\Flysystem\FilesystemOperator;
2369675509SGreg Roach
2469675509SGreg Roach/**
2569675509SGreg Roach * Make a filesystem.
2669675509SGreg Roach */
2769675509SGreg Roachinterface FilesystemFactoryInterface
2869675509SGreg Roach{
2969675509SGreg Roach    /**
3069675509SGreg Roach     * Describe a filesystem for the user's data folder.
3169675509SGreg Roach     *
3269675509SGreg Roach     * @return string
3369675509SGreg Roach     */
3469675509SGreg Roach    public function dataName(): string;
3569675509SGreg Roach
3669675509SGreg Roach    /**
3769675509SGreg Roach     * Create a filesystem for the user's data folder.
3869675509SGreg Roach     *
399458f20aSGreg Roach     * @param string $path_prefix
4069675509SGreg Roach     *
41f7cf8a15SGreg Roach     * @return FilesystemOperator
4269675509SGreg Roach     */
439458f20aSGreg Roach    public function data(string $path_prefix = ''): FilesystemOperator;
4469675509SGreg Roach
4569675509SGreg Roach    /**
4669675509SGreg Roach     * Create a filesystem for the application's root folder.
4769675509SGreg Roach     *
489458f20aSGreg Roach     * @param string $path_prefix
499458f20aSGreg Roach     *
50f7cf8a15SGreg Roach     * @return FilesystemOperator
5169675509SGreg Roach     */
529458f20aSGreg Roach    public function root(string $path_prefix = ''): FilesystemOperator;
5369675509SGreg Roach
5469675509SGreg Roach    /**
5569675509SGreg Roach     * Describe a filesystem for the application's root folder.
5669675509SGreg Roach     *
5769675509SGreg Roach     * @return string
5869675509SGreg Roach     */
5969675509SGreg Roach    public function rootName(): string;
6069675509SGreg Roach}
61