/* * Copyright (c) 2020-2023, the SerenityOS developers. * Copyright (c) 2023, Cameron Youell * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace FileSystem { class TempFile { public: static ErrorOr> create_temp_directory(); static ErrorOr> create_temp_file(); ~TempFile(); String const& path() const { return m_path; } private: enum class Type { Directory, File }; TempFile(Type type, String path) : m_type(type) , m_path(move(path)) { } Type m_type; String m_path; }; }