files.c

foundation2_fluffos_v1/lib/secure/sefun/files.c · 573 B

From the archive foundation2_fluffos_v1.zip

Download the archive   « Back to the archive contents

/*    /secure/sefun/files.c
 *    from Nightmare 3.3
 *    functions which handle file operations
 *    created by Descartes of Borg 940926
 */

#include <dirs.h>

int file_exists(string str) { return (file_size(str) > -1); }

string save_file(string who) {
    if( !stringp(who) ) error("Bad argument 1 to save_file().");
    who = convert_name(who);
    return (string)master()->player_save_file(who);
}

string user_path(string nom) {
#ifdef SUB_REALMS
    return (REALMS_DIRS "/" + nom[0..0] + "/" + nom + "/");
#else
    return (REALMS_DIRS "/" + nom + "/");
#endif
}

Site Stats

Snippets: 1791
Codebases: 571