diff --git a/util.cpp b/util.cpp index 356275df..702357ac 100644 --- a/util.cpp +++ b/util.cpp @@ -699,4 +699,8 @@ EX string decompress_string(string s) { } #endif +EX bool file_exists(string fname) { + return access(fname.c_str(), F_OK) != -1; + } + }