29 #ifndef FILE_ACCESS_MEMORY_H 30 #define FILE_ACCESS_MEMORY_H 32 #include "os/file_access.h" 45 static void cleanup();
47 virtual Error
open_custom(
const uint8_t* p_data,
int p_len);
48 virtual Error
_open(
const String& p_path,
int p_mode_flags);
52 virtual void seek(
size_t p_position);
53 virtual void seek_end(int64_t p_position);
59 virtual uint8_t
get_8()
const;
61 virtual int get_buffer(uint8_t *p_dst,
int p_length)
const;
65 virtual void store_8(uint8_t p_dest);
66 virtual void store_buffer(
const uint8_t *p_src,
int p_length);
70 virtual uint64_t _get_modified_time(
const String& p_file) {
return 0; }
77 #endif // FILE_ACCESS_MEMORY_H virtual bool is_open() const
true when file is open
Definition: file_access_memory.cpp:107
virtual size_t get_pos() const
get position in the file
Definition: file_access_memory.cpp:124
virtual void store_8(uint8_t p_dest)
store a byte
Definition: file_access_memory.cpp:174
virtual bool eof_reached() const
reading passed EOF
Definition: file_access_memory.cpp:136
virtual void close()
close a file
Definition: file_access_memory.cpp:102
virtual size_t get_len() const
get size of the file
Definition: file_access_memory.cpp:130
virtual void store_buffer(const uint8_t *p_src, int p_length)
store an array of bytes
Definition: file_access_memory.cpp:181
virtual void seek(size_t p_position)
seek to a given position
Definition: file_access_memory.cpp:112
virtual uint8_t get_8() const
get a byte
Definition: file_access_memory.cpp:141
virtual int get_buffer(uint8_t *p_dst, int p_length) const
get an array of bytes
Definition: file_access_memory.cpp:152
virtual Error _open(const String &p_path, int p_mode_flags)
open a file
Definition: file_access_memory.cpp:85
Definition: file_access.h:40
virtual void seek_end(int64_t p_position)
seek from the end of file
Definition: file_access_memory.cpp:118
virtual Error open_custom(const uint8_t *p_data, int p_len)
open a file
Definition: file_access_memory.cpp:77
Definition: file_access_memory.h:34
virtual bool file_exists(const String &p_name)
return true if a file exists
Definition: file_access_memory.cpp:68
virtual Error get_error() const
get last error
Definition: file_access_memory.cpp:169