Merge pull request #18914 from notwarp/master

added get_creation_time function for gdscript
This commit is contained in:
Juan Linietsky 2018-08-10 13:28:47 -03:00 committed by GitHub
commit 275e0d5ee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 133 additions and 0 deletions

View file

@ -498,6 +498,24 @@ uint64_t FileAccessNetwork::_get_modified_time(const String &p_file) {
return exists_modtime;
}
// NEW FUNCTION
uint64_t FileAccessNetwork::_get_creation_time(const String &p_file) {
FileAccessNetworkClient *nc = FileAccessNetworkClient::singleton;
nc->lock_mutex();
nc->put_32(id);
nc->put_32(COMMAND_GET_MODTIME);
CharString cs = p_file.utf8();
nc->put_32(cs.length());
nc->client->put_data((const uint8_t *)cs.ptr(), cs.length());
nc->unlock_mutex();
DEBUG_PRINT("MODTIME POST");
nc->sem->post();
sem->wait();
return exists_modtime;
}
void FileAccessNetwork::configure() {
GLOBAL_DEF("network/remote_fs/page_size", 65536);