Cogs.Foundation
Loading...
Searching...
No Matches
Namespaces | Typedefs | Functions
IO.h File Reference
#include "FileContents.h"
#include "FileHandle.h"
#include <filesystem>

Go to the source code of this file.

Namespaces

namespace  Cogs
 Main Cogs namespace.
 
namespace  Cogs::IO
 

Typedefs

using Cogs::IO::RecursiveDirIterator = fs::recursive_directory_iterator
 
using Cogs::IO::DirectoryEntry = fs::directory_entry
 
using Cogs::IO::FileTimeType = fs::file_time_type
 

Functions

COGSFOUNDATION_API void Cogs::IO::readFileAsync (const std::string &fileName, const FileContents::Callback &callback, uint64_t offset=0, uint64_t size=0, FileContentsHints hints=FileContentsHints::None)
 
COGSFOUNDATION_API FileContents::Ptr Cogs::IO::readFileSync (const std::string &fileName, uint64_t offset=0, uint64_t size=0, FileContentsHints hints=FileContentsHints::None)
 
COGSFOUNDATION_API bool Cogs::IO::readTextFile (std::string &content, const std::string &fileName)
 
COGSFOUNDATION_API void Cogs::IO::autoExpandEnvironmentVariables (std::string &text)
 
COGSFOUNDATION_API std::string Cogs::IO::expandEnvironmentVariables (const std::string &input)
 
COGSFOUNDATION_API std::string Cogs::IO::expandEnvironmentVariable (const std::string &name)
 
COGSFOUNDATION_API char Cogs::IO::pathSeparator ()
 
COGSFOUNDATION_API bool Cogs::IO::exists (std::string_view path)
 
COGSFOUNDATION_API bool Cogs::IO::isFile (std::string_view path)
 
COGSFOUNDATION_API bool Cogs::IO::isDirectory (std::string_view path)
 
COGSFOUNDATION_API std::string Cogs::IO::absolute (std::string_view path)
 
COGSFOUNDATION_API std::string Cogs::IO::canonical (std::string_view path)
 
COGSFOUNDATION_API bool Cogs::IO::remove (std::string_view path)
 
COGSFOUNDATION_API std::string Cogs::IO::combine (std::string_view path, std::string_view extensionPath)
 Combine the two paths with a directory separator.
 
COGSFOUNDATION_API std::string Cogs::IO::expandPath (std::string_view fileName)
 
COGSFOUNDATION_API std::string Cogs::IO::parentPath (std::string_view str)
 
COGSFOUNDATION_API std::string Cogs::IO::relativePath (std::string_view str)
 
COGSFOUNDATION_API std::string Cogs::IO::relativePath (std::string_view str, std::string_view base)
 
COGSFOUNDATION_API std::string Cogs::IO::getPathToExe ()
 
COGSFOUNDATION_API std::string Cogs::IO::getPathRelativeToDll (const std::string &fileName, void *handle)
 
COGSFOUNDATION_API std::string Cogs::IO::getTempPath ()
 
COGSFOUNDATION_API std::string Cogs::IO::getAppDataPath ()
 
COGSFOUNDATION_API std::string Cogs::IO::getOrgLocalDataPath ()
 
COGSFOUNDATION_API bool Cogs::IO::isAbsolute (std::string_view str)
 
COGSFOUNDATION_API bool Cogs::IO::isRelative (std::string_view str)
 
COGSFOUNDATION_API std::string Cogs::IO::fileName (std::string_view str)
 
COGSFOUNDATION_API std::string Cogs::IO::extension (std::string_view str)
 
COGSFOUNDATION_API std::string Cogs::IO::stem (std::string_view str)
 
COGSFOUNDATION_API void Cogs::IO::replaceAll (std::string &str, std::string_view from, std::string_view to)
 
COGSFOUNDATION_API FileTimeType Cogs::IO::getFileTime (std::string_view path)
 
COGSFOUNDATION_API uint64_t Cogs::IO::getFileSize (std::string_view path)
 
COGSFOUNDATION_API bool Cogs::IO::writeBinaryFile (const std::string &fileName, const void *content, size_t contentSize)
 
COGSFOUNDATION_API bool Cogs::IO::createDirectories (std::string_view fileName)
 
COGSFOUNDATION_API RecursiveDirIterator Cogs::IO::directoryIterator (std::string_view directory)
 
COGSFOUNDATION_API std::string Cogs::IO::getPath (const DirectoryEntry &entry)
 
COGSFOUNDATION_API bool Cogs::IO::copyFile (std::string_view src, std::string_view dest)
 
COGSFOUNDATION_API void Cogs::IO::backupFile (const std::string &path, int max)
 
COGSFOUNDATION_API FileHandle::Ptr Cogs::IO::openFile (std::string_view path, FileHandle::OpenMode openMode, FileHandle::AccessMode accessMode)
 
COGSFOUNDATION_API void Cogs::IO::closeFile (const FileHandle::Ptr &handle)
 
COGSFOUNDATION_API size_t Cogs::IO::fileSize (const FileHandle::Ptr &handle)
 
COGSFOUNDATION_API void * Cogs::IO::mapFile (const FileHandle::Ptr &handle, FileHandle::ProtectionMode protectionMode, size_t offset, size_t size)
 
COGSFOUNDATION_API void Cogs::IO::unmapFile (const FileHandle::Ptr &handle)