mirror of
https://github.com/Relintai/sfw.git
synced 2024-12-20 21:06:49 +01:00
Also added a non-static open() method to FileAccess.
This commit is contained in:
parent
bddae4352f
commit
fa02bad17b
@ -691,6 +691,10 @@ Error FileAccess::reopen(const String &p_path, int p_mode_flags) {
|
||||
return _open(p_path, p_mode_flags);
|
||||
};
|
||||
|
||||
Error FileAccess::open(const String &p_path, int p_mode_flags) {
|
||||
return _open(p_path, p_mode_flags);
|
||||
}
|
||||
|
||||
FileAccess *FileAccess::create_and_open(const String &p_path, int p_mode_flags, Error *r_error) {
|
||||
//try packed data first
|
||||
|
||||
|
@ -126,8 +126,10 @@ public:
|
||||
|
||||
virtual Error reopen(const String &p_path, int p_mode_flags); ///< does not change the AccessType
|
||||
|
||||
Error open(const String &p_path, int p_mode_flags);
|
||||
|
||||
static FileAccess *create(); /// Helper that Creates a file access
|
||||
static FileAccess *create_and_open(const String &p_path, int p_mode_flags, Error *r_error = nullptr); /// Create a file access (for the current platform) this is the only portable way of accessing files.
|
||||
static FileAccess *create_and_open(const String &p_path, int p_mode_flags, Error *r_error = nullptr);
|
||||
static bool exists(const String &p_name); ///< return true if a file exists
|
||||
static uint64_t get_modified_time(const String &p_file);
|
||||
static uint32_t get_unix_permissions(const String &p_file);
|
||||
|
Loading…
Reference in New Issue
Block a user