29 #ifndef FILE_ACCESS_BUFFERED_H 30 #define FILE_ACCESS_BUFFERED_H 32 #include "os/file_access.h" 41 DEFAULT_CACHE_SIZE = 128 * 1024,
48 int cache_data_left()
const;
49 mutable Error last_error;
53 Error set_error(Error p_error)
const;
70 virtual int read_data_block(
int p_offset,
int p_size, uint8_t *p_dest = 0)
const =0;
72 void set_cache_size(
int p_size);
80 virtual void seek(
size_t p_position);
81 virtual void seek_end(int64_t p_position=0);
85 virtual uint8_t
get_8()
const;
86 virtual int get_buffer(uint8_t *p_dst,
int p_length)
const;
virtual void seek(size_t p_position)
seek to a given position
Definition: file_access_buffered.cpp:68
virtual bool is_open() const
true when file is open
Definition: file_access_buffered.cpp:167
virtual Error get_error() const
get last error
Definition: file_access_buffered.cpp:172
virtual void seek_end(int64_t p_position=0)
seek from the end of file
Definition: file_access_buffered.cpp:73
Definition: file_access_buffered.h:37
virtual int get_buffer(uint8_t *p_dst, int p_length) const
get an array of bytes
Definition: file_access_buffered.cpp:108
Definition: file_access_buffered.h:55
virtual size_t get_pos() const
get position in the file
Definition: file_access_buffered.cpp:78
Definition: file_access_buffered.h:64
virtual size_t get_len() const
get size of the file
Definition: file_access_buffered.cpp:83
virtual bool eof_reached() const
reading passed EOF
Definition: file_access_buffered.cpp:88
Definition: file_access.h:40
virtual uint8_t get_8() const
get a byte
Definition: file_access_buffered.cpp:93