#pragma region CPL License /* Nuclex Native Framework Copyright (C) 2002-2023 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion // CPL License #ifndef NUCLEX_SUPPORT_PLATFORM_POSIXPATHAPI_H #define NUCLEX_SUPPORT_PLATFORM_POSIXPATHAPI_H #include "Nuclex/Support/Config.h" #if !defined(NUCLEX_SUPPORT_WINDOWS) #include "PosixApi.h" namespace Nuclex { namespace Support { namespace Platform { // ------------------------------------------------------------------------------------------- // /// Wraps or reimplements the Posix path API class PosixPathApi { /// Checks if the specified path is a relative path /// Path that will be checked /// True if the path is a relative path public: static bool IsPathRelative(const std::string &path); /// Appends one path to another /// Path to which another path will be appended /// Other path that will be appended public: static void AppendPath(std::string &path, const std::string &extra); /// Removes the file name from a path containing a file name /// Path from which the file name will be removed public: static void RemoveFileFromPath(std::string &path); /// Checks if the specified path exists and if it is a file /// Path that will be checked /// True if the path exists and is a file, false otherwise public: static bool DoesFileExist(const std::string &path); /// Determines the path of the user's temporary directory /// /// String in which the full path of the temporary directory will be placed /// public: static void GetTemporaryDirectory(std::string &path); }; // ------------------------------------------------------------------------------------------- // }}} // namespace Nuclex::Support::Platform #endif // !defined(NUCLEX_SUPPORT_WINDOWS) #endif // NUCLEX_SUPPORT_PLATFORM_POSIXPATHAPI_H