2014-10-22 11:33:36 -04:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2014-10-22 11:33:36 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2014-10-22 11:33:36 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP;
|
|
|
|
|
|
2015-04-16 11:00:08 -04:00
|
|
|
/**
|
|
|
|
|
* Interface ITempManager
|
|
|
|
|
*
|
|
|
|
|
* @since 8.0.0
|
|
|
|
|
*/
|
2014-10-22 11:33:36 -04:00
|
|
|
interface ITempManager {
|
|
|
|
|
/**
|
|
|
|
|
* Create a temporary file and return the path
|
|
|
|
|
*
|
2025-02-18 06:30:33 -05:00
|
|
|
* @param string $postFix Postfix appended to the temporary file name
|
|
|
|
|
*
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.0.0
|
2014-10-22 11:33:36 -04:00
|
|
|
*/
|
2025-02-18 06:30:33 -05:00
|
|
|
public function getTemporaryFile(string $postFix = ''): string|false;
|
2014-10-22 11:33:36 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a temporary folder and return the path
|
|
|
|
|
*
|
2025-02-18 06:30:33 -05:00
|
|
|
* @param string $postFix Postfix appended to the temporary folder name
|
|
|
|
|
*
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.0.0
|
2014-10-22 11:33:36 -04:00
|
|
|
*/
|
2025-02-18 06:30:33 -05:00
|
|
|
public function getTemporaryFolder(string $postFix = ''): string|false;
|
2014-10-22 11:33:36 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Remove the temporary files and folders generated during this request
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.0.0
|
2014-10-22 11:33:36 -04:00
|
|
|
*/
|
|
|
|
|
public function clean();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Remove old temporary files and folders that were failed to be cleaned
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.0.0
|
2014-10-22 11:33:36 -04:00
|
|
|
*/
|
|
|
|
|
public function cleanOld();
|
2015-08-29 12:36:21 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get the temporary base directory
|
|
|
|
|
*
|
|
|
|
|
* @return string
|
|
|
|
|
* @since 8.2.0
|
|
|
|
|
*/
|
|
|
|
|
public function getTempBaseDir();
|
2014-10-22 11:33:36 -04:00
|
|
|
}
|