Namespaces | |
namespace | WellKnownLocations |
Classes | |
class | AppTmpFileManager |
class | DirectoryIterable |
class | DirectoryIterator |
struct | DiskInfoType |
class | Exception |
class | MemoryMappedFileReader |
struct | MountedFilesystemType |
class | Ptr |
class | ScopedTmpDir |
class | ScopedTmpFile |
class | ThroughTmpFileWriter |
utility to atomically update/write a file. More... | |
Typedefs | |
using | FileOffset_t = int64_t |
Enumerations | |
enum class | BlockDeviceKind { eRemovableDisk , eLocalDisk , eNetworkDrive , eTemporaryFiles , eReadOnlyEjectable , eSystemInformation , Stroika_Define_Enum_Bounds =(eRemovableDisk, eSystemInformation) } |
Functions | |
Containers::KeyedCollection< DiskInfoType, filesystem::path > | GetAvailableDisks () |
Ptr | Default () |
String | GetVolumeName (const filesystem::path &driveLetterAbsPath) |
Containers::KeyedCollection< MountedFilesystemType, filesystem::path > | GetMountedFilesystems () |
String | AssureDirectoryPathSlashTerminated (const String &dirPath) |
String | SafeFilenameChars (const String &s) |
String | AssureLongFileName (const String &fileName) |
filesystem::path | CreateTmpFile (const String &baseName) |
TODO:
TODO:
o This file is obsolete, and will be gradually replaced - moving its contents out to other modules
TODO:
using Stroika::Foundation::IO::FileSystem::FileOffset_t = typedef int64_t |
Definition at line 28 of file Foundation/IO/FileSystem/Common.h.
|
strong |
KeyedCollection< DiskInfoType, filesystem::path > Stroika::Foundation::IO::FileSystem::GetAvailableDisks | ( | ) |
Fetch all the available disks (DiskInfoType) installed on the system, keyed by fDeviceName
IO::FileSystem::Ptr Stroika::Foundation::IO::FileSystem::Default | ( | ) |
Definition at line 153 of file Foundation/IO/FileSystem/Filesystem.cpp.
String Stroika::Foundation::IO::FileSystem::GetVolumeName | ( | const filesystem::path & | driveLetterAbsPath | ) |
Possibly useful, even after using std::filesystem, as I dont think supported in std::filesystem. but
Definition at line 199 of file FileUtils.cpp.
Containers::KeyedCollection< MountedFilesystemType, filesystem::path > Stroika::Foundation::IO::FileSystem::GetMountedFilesystems | ( | ) |
Fetch all the mounted filesystems on this computer. Somewhat analagous to the UNIX 'df' command, or cat /etc/mtab
Definition at line 318 of file MountedFilesystem.cpp.
String Stroika::Foundation::IO::FileSystem::AssureDirectoryPathSlashTerminated | ( | const String & | dirPath | ) |
This function presumes its argument is a directory, and makes sure it has a filesystem::path::preferred_separator character at the end. Use this when given a directory from some source that isn't so careful, so code can generally operate with the assumption that directories have that trailing slash, so its easier to compose pathnames.
Definition at line 24 of file PathName.cpp.
Map ALL characters in the string to something safe to use for a filename. This gets rid of { ':', '/', '\', and '.' }
@todo - consider having optional parameter to specify which characters get mapped, and how. maybe static const Mapping<Character,String> kDefaultSafeFilenmaeCharsMapping = {{':', " ", etc...}).
Definition at line 48 of file PathName.cpp.
if Win32 'short-file-name' - 8.3 - extend and return associated longfilename
Definition at line 77 of file PathName.cpp.
filesystem::path Stroika::Foundation::IO::FileSystem::CreateTmpFile | ( | const String & | baseName | ) |
Creates an empty file with a random/unique name (based on baseName) in inFolder (or if not specified, in the WellKnownLocations::GetTemporary () directory) and returns that filename. These files are NOT automatically cleaned up by Stroika (for that see ScopedTmpFile).
require root_path is empty - just filename and possibly extention. If extension missing, maybe added automatically
Definition at line 195 of file TemporaryFile.cpp.