Task

Delete a file called "input.txt" and delete a directory called "docs".

This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.




const std = @import("std");
const fs = std.fs;
 
pub fn main() !void {
    const here = fs.cwd();
    try here.deleteFile("input.txt");
    try here.deleteDir("docs");
 
    const root = try fs.openDirAbsolute("/", .{});
    try root.deleteFile("input.txt");
    try root.deleteDir("docs");
}