You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Implemented get_path() & get_path_absolute() for FileAccessEncrypted
This commit is contained in:
@@ -176,6 +176,22 @@ bool FileAccessEncrypted::is_open() const {
|
|||||||
return file != NULL;
|
return file != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String FileAccessEncrypted::get_path() const {
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
return file->get_path();
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
String FileAccessEncrypted::get_path_absolute() const {
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
return file->get_path_absolute();
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
void FileAccessEncrypted::seek(size_t p_position) {
|
void FileAccessEncrypted::seek(size_t p_position) {
|
||||||
|
|
||||||
if (p_position > (size_t)data.size())
|
if (p_position > (size_t)data.size())
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ public:
|
|||||||
virtual void close(); ///< close 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 String get_path() const; /// returns the path for the current open file
|
||||||
|
virtual String get_path_absolute() const; /// returns the absolute path for the current open file
|
||||||
|
|
||||||
virtual void seek(size_t p_position); ///< seek to a given position
|
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 void seek_end(int64_t p_position = 0); ///< seek from the end of file
|
||||||
virtual size_t get_position() const; ///< get position in the file
|
virtual size_t get_position() const; ///< get position in the file
|
||||||
|
|||||||
Reference in New Issue
Block a user