diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-03-10 12:55:31 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-05-22 17:33:34 +0300 |
commit | 139a9d637084f928c3ed43ac6aad2178748ed8e4 (patch) | |
tree | 5df39ebfdb65a72d60e77501d71c6370d493e78f /core/os/dir_access.h | |
parent | 78861fde0b383e5fe361e73a451bf58ef117c20f (diff) |
Add symlink API to the DirAccess (on macOS and Linux).
Diffstat (limited to 'core/os/dir_access.h')
-rw-r--r-- | core/os/dir_access.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/os/dir_access.h b/core/os/dir_access.h index ec738d30d5..16154a4850 100644 --- a/core/os/dir_access.h +++ b/core/os/dir_access.h @@ -50,7 +50,7 @@ private: AccessType _access_type = ACCESS_FILESYSTEM; static CreateFunc create_func[ACCESS_MAX]; ///< set this to instance a filesystem object - Error _copy_dir(DirAccess *p_target_da, String p_to, int p_chmod_flags); + Error _copy_dir(DirAccess *p_target_da, String p_to, int p_chmod_flags, bool p_copy_links); protected: String _get_root_path() const; @@ -89,11 +89,15 @@ public: static bool exists(String p_dir); virtual uint64_t get_space_left() = 0; - Error copy_dir(String p_from, String p_to, int p_chmod_flags = -1); + Error copy_dir(String p_from, String p_to, int p_chmod_flags = -1, bool p_copy_links = false); virtual Error copy(String p_from, String p_to, int p_chmod_flags = -1); virtual Error rename(String p_from, String p_to) = 0; virtual Error remove(String p_name) = 0; + virtual bool is_link(String p_file) = 0; + virtual String read_link(String p_file) = 0; + virtual Error create_link(String p_source, String p_target) = 0; + // Meant for editor code when we want to quickly remove a file without custom // handling (e.g. removing a cache file). static void remove_file_or_error(String p_path) { |