/*
* dbMango
*
* Copyright 2025 Deutsche Bank AG
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace Rms.Risk.Mango.Services;
///
/// Temporary files storage. All files there will be erased when workflow finishes (even if failed).
///
public interface ITempFileStorage
{
///
/// Local folder that persist between workflow runs. However, contents of this folder can be cleared without any warnings.
/// Use for persistent caching only. Do not use for storage.
///
string LocalPersistentFolder { get; }
///
/// Temporary files folder path. It's not recommended to use. Better use
///
string TempFolder { get; }
///
/// Create a new temp file name. You can't control its name, but name will contain type name of "t" argument.
///
/// Type that requested the temp file creation
/// Unique temp file name
string GetTempFileName(Type t);
///
/// Create a new temp file name. You can't control its name, but name will contain type name of "t" argument.
///
/// Unique temp file name
string GetTempFileName();
///
/// Create a new temp file name. You can't control its name, but name will contain type name of "t" argument.
///
/// Type name that requested the temp file creation or any other indicative string
/// Unique temp file name
string GetTempFileName(string key);
}