mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
improved save path error messages for scene, textures and audio, fixes #1514
This commit is contained in:
parent
87c51b6fc0
commit
2dfa1279ea
6 changed files with 61 additions and 9 deletions
|
|
@ -399,6 +399,15 @@ Error DirAccess::copy(String p_from,String p_to) {
|
|||
return err;
|
||||
}
|
||||
|
||||
bool DirAccess::exists(String p_dir) {
|
||||
|
||||
DirAccess* da = DirAccess::create_for_path(p_dir);
|
||||
bool valid = da->change_dir(p_dir)==OK;
|
||||
memdelete(da);
|
||||
return valid;
|
||||
|
||||
}
|
||||
|
||||
DirAccess::DirAccess(){
|
||||
|
||||
_access_type=ACCESS_FILESYSTEM;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
virtual bool file_exists(String p_file)=0;
|
||||
virtual bool dir_exists(String p_dir)=0;
|
||||
|
||||
static bool exists(String p_dir);
|
||||
virtual size_t get_space_left()=0;
|
||||
|
||||
virtual Error copy(String p_from,String p_to);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue