3#include <Foundation/IO/FileSystem/FileSystem.h>
4#include <Foundation/IO/FileSystem/Implementation/DataDirType.h>
5#include <Foundation/IO/Stream.h>
22 plStringBuilder sAbs = m_pDataDirReader->GetDataDirectory()->GetRedirectedDataDirectoryPath();
23 sAbs.
AppendPath(m_pDataDirReader->GetFilePath().GetView());
34 bool IsOpen()
const {
return m_pDataDirReader !=
nullptr; }
37 plUInt64
GetFileSize()
const {
return m_pDataDirReader->GetFileSize(); }
42 return plFileSystem::GetFileReader(sFile, FileShareMode, bAllowFileEvents);
64 plStringBuilder sAbs = m_pDataDirWriter->GetDataDirectory()->GetRedirectedDataDirectoryPath();
65 sAbs.
AppendPath(m_pDataDirWriter->GetFilePath().GetView());
76 bool IsOpen()
const {
return m_pDataDirWriter !=
nullptr; }
79 plUInt64
GetFileSize()
const {
return m_pDataDirWriter->GetFileSize(); }
84 return plFileSystem::GetFileWriter(sFile, FileShareMode, bAllowFileEvents);
A base class for readers that handle reading from a (virtual) file inside a data directory.
Definition DataDirType.h:173
The base class for all data directory types.
Definition DataDirType.h:37
A base class for writers that handle writing to a (virtual) file inside a data directory.
Definition DataDirType.h:212
Definition FileReaderWriterBase.h:13
bool IsOpen() const
Returns true, if the file is currently open.
Definition FileReaderWriterBase.h:34
plDataDirectoryType * GetDataDirectory() const
Returns the plDataDirectoryType over which this file has been opened.
Definition FileReaderWriterBase.h:31
plString128 GetFilePathRelative() const
Returns the relative path of the file within its data directory (excluding the prefix of the data dir...
Definition FileReaderWriterBase.h:28
plUInt64 GetFileSize() const
Returns the current total size of the file.
Definition FileReaderWriterBase.h:37
plString128 GetFilePathAbsolute() const
Returns the absolute path with which the file was opened (including the prefix of the data directory)...
Definition FileReaderWriterBase.h:20
Definition FileReaderWriterBase.h:55
plDataDirectoryType * GetDataDirectory() const
Returns the plDataDirectoryType over which this file has been opened.
Definition FileReaderWriterBase.h:73
plString128 GetFilePathAbsolute() const
Returns the absolute path with which the file was opened (including the prefix of the data directory)...
Definition FileReaderWriterBase.h:62
plString128 GetFilePathRelative() const
Returns the relative path of the file within its data directory (excluding the prefix of the data dir...
Definition FileReaderWriterBase.h:70
plUInt64 GetFileSize() const
Returns the current total size of the file.
Definition FileReaderWriterBase.h:79
bool IsOpen() const
Returns true, if the file is currently open.
Definition FileReaderWriterBase.h:76
Interface for binary in (read) streams.
Definition Stream.h:22
Interface for binary out (write) streams.
Definition Stream.h:107
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
void AppendPath(plStringView sPath1, plStringView sPath2={}, plStringView sPath3={}, plStringView sPath4={})
Appends several path pieces. Makes sure they are always properly separated by a slash.
Definition StringBuilder.cpp:866
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Enum
Definition FileEnums.h:7