8#include "Arp/System/Commons/Io/Stream.hpp" 
    9#include "Arp/System/Commons/Io/FileMode.hpp" 
   10#include "Arp/System/Commons/Io/FileAccess.hpp" 
   13namespace Arp { 
namespace System { 
namespace Ve
 
   18namespace Arp { 
namespace System { 
namespace Commons { 
namespace Io
 
   27    using IFileService = Arp::System::Ve::IFileService;
 
   51    void Flush(
void) 
override;
 
   52    size_t Seek(
size_t offset, SeekOrigin origin) 
override;
 
   53    size_t Read(
byte* pBuffer, 
size_t bufferSize, 
size_t offset, 
size_t count) 
override;
 
   54    void Write(
const byte* pBuffer, 
size_t bufferSize, 
size_t offset, 
size_t count) 
override;
 
   60    static bool DetermineCanRead(
FileAccess access);
 
   61    static bool DetermineCanWrite(
FileAccess access);
 
   65    IFileService* pFileService = 
nullptr;
 
This abstract class shall be the base class of all stream implementations.
Definition: Stream.hpp:20
 
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
 
Exposes a Stream around a file, supporting read and write operations.
Definition: FileStream.hpp:25
 
FileStream(const String &path, FileMode mode)
Initializes a new instance of the FileStream class.
Definition: FileStream.cpp:27
 
FileStream(const FileStream &arg)=delete
Copy constructor.
 
void SetLength(size_t length)
Reserves a specific amount of bytes for the opened file.
Definition: FileStream.cpp:163
 
size_t Seek(size_t offset, SeekOrigin origin) override
Sets a new position if the internal stream pointer relative to a specific position.
Definition: FileStream.cpp:203
 
~FileStream(void) override
Destructs this instance and frees all resources.
Definition: FileStream.cpp:67
 
size_t Read(byte *pBuffer, size_t bufferSize, size_t offset, size_t count) override
Reads data from stream into assigned buffer at a specific offset.
Definition: FileStream.cpp:243
 
void Write(const byte *pBuffer, size_t bufferSize, size_t offset, size_t count) override
Writes data from assigned buffer to stream.
Definition: FileStream.cpp:275
 
size_t GetPosition(void) override
Returns the byte offset of the internal stream pointer from the beginning of the file.
Definition: FileStream.cpp:172
 
void SetPosition(size_t position) override
Sets a new position of the internal stream pointer.
Definition: FileStream.cpp:181
 
FileStream & operator=(const FileStream &arg)=delete
Assignment operator.
 
void Flush(void) override
Forces a write of all possibly buffered data (input stream) or discards any buffered not yet read by ...
Definition: FileStream.cpp:193
 
size_t GetLength(void)
Returns the size of the opened file in bytes.
Definition: FileStream.cpp:144
 
FileMode
Contains constants for specifying how the OS should open a file.
Definition: FileMode.hpp:24
 
FileAccess
Contains constants for specifying the access you want for a file. You can have Read,...
Definition: FileAccess.hpp:18
 
Root namespace for the PLCnext API