+ Begins the search for files/directories matching the given mask and returns the first result.
+ Returns "" and sets
nsfs_status if nothing can be found.
+ This is much akin to
file_find_first, but with one remark: instead of taking attributes as a second parameter (which gives very limited freedom to filtering results), there is a
file_find_attributes_ns function that returns the attributes of the current file in search.
+ For example, if you wanted to pick through just files (no directories) in
maps subdirectory in game's directory, you would do that like so:
+
+for (var f = file_find_first_ns("maps/*.*"); f != ""; f = file_find_next_ns()) {
+ if (file_find_attributes_ns() & fa_directory) continue;
+ // file is not a directory - do something here
+ show_debug_message(f + ": " + string(file_find_size_ns() / 1024) + "KB");
+}
+file_find_close();
+
+ which would display results like
some.map (given
maps/some.map).
+