In this task, the job is to create a new empty file called "output.txt" of size 0 bytes
and an empty directory called "docs". This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.

void create_file(string path) {
    FILE f;
    unless (exists(path)) {
        unless (f = fopen(path, "w")){
            die(path);
        } else {
            puts("file ${path} created");
            fclose(f);
        }
    } else {
        puts("File ${path} already exists");
    }
}
 
void create_dir(string path) {
    unless (exists(path)) {
        unless(mkdir(path)) { //mkdir returns 0 on success, -1 on error
            puts("directory ${path} created");
        } else {
            puts(stderr, "Error: directory ${path} not created");   
        }
    } else {
        puts("directory ${path} already exists");
    }
}
 
create_file("output.txt");
create_file("/tmp/output.txt");
create_dir("docs");
create_dir("/tmp/docs");