1 #!/usr/local/bin/rune -x
8 main(int ac, char **av)
12 char buf[Fs.PATH_MAX];
18 if (fs.open("test.x1", O_RDWR|O_CREAT|O_TRUNC, 0666) < 0) {
19 stdio.stderr->show("failed to create test.x1 ", fs.error);
22 if (fs.symlink("test.x1", "test.x2") < 0) {
23 stdio.stderr->show("failed to symlink test.x2 ", fs.error);
26 if (fs.readlink("test.x2", buf) < 0) {
27 stdio.stderr->show("failed to readlink test.x2 ", fs.error);
30 stdio.stderr->format("readlink test.x2: %s\n", &buf[0]);
31 if (fs.link("test.x1", "test.x3") < 0) {
32 stdio.stderr->show("failed to link test.x3 ", fs.error);
35 if (fs.unlink("test.x1") < 0) {
36 stdio.stderr->show("failed to unlink test.x1 ", fs.error);
39 #fs.unlink("test.x2");
40 #fs.unlink("test.x3");
41 stdio.stderr->show("all tests succeeded");