aboutsummaryrefslogtreecommitdiff
path: root/drivers/unix/file_access_unix.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-19 00:36:26 +0100
committerRémi Verschelde2017-03-19 00:36:26 +0100
commitf8db8a3faa30b71dca33ced38be16d3f93f43e8a (patch)
tree3b798318132cca7eccfbca5818ab55656a2896d7 /drivers/unix/file_access_unix.h
parent1d418afe863c9e553b69174ce63aef203c46d2f0 (diff)
downloadgodot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.gz
godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.tar.zst
godot-f8db8a3faa30b71dca33ced38be16d3f93f43e8a.zip
Diffstat (limited to 'drivers/unix/file_access_unix.h')
-rw-r--r--drivers/unix/file_access_unix.h39
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 57b643dc2..4b5897e9a 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -39,50 +39,47 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-
-typedef void (*CloseNotificationFunc)(const String& p_file,int p_flags);
+typedef void (*CloseNotificationFunc)(const String &p_file, int p_flags);
class FileAccessUnix : public FileAccess {
-
+
FILE *f;
int flags;
void check_errors() const;
mutable Error last_error;
String save_path;
String path;
-
- static FileAccess* create_libc();
+
+ static FileAccess *create_libc();
+
public:
-
static CloseNotificationFunc close_notification_func;
- virtual Error _open(const String& p_path, int p_mode_flags); ///< open a file
+ virtual Error _open(const String &p_path, int p_mode_flags); ///< open a file
virtual void close(); ///< close a file
- virtual bool is_open() const; ///< true when file is open
+ virtual bool is_open() const; ///< true when file is open
- virtual void seek(size_t p_position); ///< seek to a given position
- virtual void seek_end(int64_t p_position=0); ///< seek from the end of file
- virtual size_t get_pos() const; ///< get position in the file
- virtual size_t get_len() const; ///< get size of the file
+ virtual void seek(size_t p_position); ///< seek to a given position
+ virtual void seek_end(int64_t p_position = 0); ///< seek from the end of file
+ virtual size_t get_pos() const; ///< get position in the file
+ virtual size_t get_len() const; ///< get size of the file
- virtual bool eof_reached() const; ///< reading passed EOF
+ virtual bool eof_reached() const; ///< reading passed EOF
- virtual uint8_t get_8() const; ///< get a byte
+ virtual uint8_t get_8() const; ///< get a byte
virtual int get_buffer(uint8_t *p_dst, int p_length) const;
- virtual Error get_error() const; ///< get last error
+ virtual Error get_error() const; ///< get last error
- virtual void store_8(uint8_t p_dest); ///< store a byte
-
- virtual bool file_exists(const String& p_path); ///< return true if a file exists
+ virtual void store_8(uint8_t p_dest); ///< store a byte
- virtual uint64_t _get_modified_time(const String& p_file);
+ virtual bool file_exists(const String &p_path); ///< return true if a file exists
+
+ virtual uint64_t _get_modified_time(const String &p_file);
FileAccessUnix();
virtual ~FileAccessUnix();
-
};
-
#endif
#endif