71 size_t bufferSizeToUse = 16384);
95 bool openedOk() const noexcept {
return status.wasOk(); }
104 void flush()
override;
105 int64 getPosition()
override;
106 bool setPosition (int64)
override;
107 bool write (
const void*,
size_t)
override;
108 bool writeRepeatedByte (uint8 byte,
size_t numTimesToRepeat)
override;
114 void* fileHandle =
nullptr;
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);
#define JUCE_API
This macro is added to all JUCE public class declarations.
static Result ok() noexcept
Creates and returns a 'successful' result.
const Result & getStatus() const noexcept
Returns the status of the file stream.
Represents the 'success' or 'failure' of an operation, and holds an associated error message to descr...
Represents a local file or directory.
The base class for streams that write data to some kind of destination.
An output stream that writes into a local file.
bool openedOk() const noexcept
Returns true if the stream opened without problems.
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.