MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / touch_file

Method touch_file

utility/common.cpp:942–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940}
941
942Error gdre::touch_file(const String &path) {
943 Ref<FileAccess> fa = FileAccess::open(path, FileAccess::READ_WRITE);
944 if (fa.is_null()) {
945 return ERR_FILE_CANT_OPEN;
946 }
947 size_t size = fa->get_length();
948 fa->resize(size);
949 fa->close();
950 return OK;
951}
952
953//void get_chars_in_set(const String &s, const HashSet<char32_t> &chars, HashSet<char32_t> &ret);
954

Callers

nothing calls this directly

Calls 3

get_lengthMethod · 0.45
resizeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected