You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
added get_creation_time function for gdscript
This commit is contained in:
@@ -489,6 +489,19 @@ uint64_t FileAccess::get_modified_time(const String &p_file) {
|
||||
memdelete(fa);
|
||||
return mt;
|
||||
}
|
||||
// NEW FUNCTION
|
||||
uint64_t FileAccess::get_creation_time(const String &p_file) {
|
||||
|
||||
if (PackedData::get_singleton() && !PackedData::get_singleton()->is_disabled() && PackedData::get_singleton()->has_path(p_file))
|
||||
return 0;
|
||||
|
||||
FileAccess *fa = create_for_path(p_file);
|
||||
ERR_FAIL_COND_V(!fa, 0);
|
||||
|
||||
uint64_t ct = fa->_get_creation_time(p_file);
|
||||
memdelete(fa);
|
||||
return ct;
|
||||
}
|
||||
|
||||
void FileAccess::store_string(const String &p_string) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user