104 void flush()
override;
105 int64 getPosition()
override;
106 bool setPosition (int64)
override;
107 bool write (
const void*,
size_t)
override;
114 void* fileHandle =
nullptr;
115 Result status { Result::ok() };
116 int64 currentPosition = 0;
117 size_t bufferSize, bytesInBuffer = 0;
122 void flushInternal();
124 int64 setPositionInternal (int64);
125 ssize_t writeInternal (
const void*,
size_t);
Holds a resizable array of primitive or copy-by-value objects.
An output stream that writes into a local file.
const Result & getStatus() const noexcept
Returns the status of the file stream.
const File & getFile() const
Returns the file that this stream is writing to.
bool failedToOpen() const noexcept
Returns true if the stream couldn't be opened for some reason.
bool openedOk() const noexcept
Returns true if the stream opened without problems.
Result truncate()
Attempts to truncate the file to the current write position.
Represents a local file or directory.
The base class for streams that write data to some kind of destination.
Represents the 'success' or 'failure' of an operation, and holds an associated error message to descr...
#define JUCE_API
This macro is added to all JUCE public class declarations.