arudradey's picture
download
raw
743 Bytes
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
int main() {
assert(mkdir("test", 0777) == 0);
assert(mkdir("test/a", 0777) == 0);
assert(mkdir("test/a/..", 0777) == -1);
printf("error: %s\n", strerror(errno));
assert(errno == EEXIST);
assert(mkdir("test/a/.", 0777) == -1);
printf("error: %s\n", strerror(errno));
assert(errno == EEXIST);
assert(mkdir("test/a/b/..", 0777) == -1);
printf("error: %s\n", strerror(errno));
assert(errno == ENOENT);
assert(mkdir("test/a/b/.", 0777) == -1);
printf("error: %s\n", strerror(errno));
assert(errno == ENOENT);
printf("success\n");
}

Xet Storage Details

Size:
743 Bytes
·
Xet hash:
fdfe243b079bec838f5d2957b63c3862be667fb2b9c3122a4615b0a5fab411c2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.