mkdir.c

merentha_fluffos_v2/lib/cmds/admin/mkdir.c · 446 B

From the archive merentha_fluffos_v2.zip

Download the archive   « Back to the archive contents

// Petrarch
// Merentha Lib 1.0
// <mkdir>

varargs int command(string file) {

  if(!file) return notify_fail("Syntax: mkdir <file>\n");
  if(file[0..0]!="/") file=this_player()->query_cwd()+file;
  if(file_size(file)!=-1) return notify_fail("File exist or is a directory already.\n");

  mkdir(file);
  return 1;
}

string help() {
return "Syntax: mkdir <directory>\n\nMakes a new directory (foulder) called <directory>.\n\nSee also: rmdir";
}

Site Stats

Snippets: 1791
Codebases: 571