about summary refs log tree commit diff
path: root/src/ls.zig
blob: 64e27cfc00cec678a88c7b101fe98273337a91ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const std = @import("std");

pub fn ls() !void {
    const dir = try std.fs.cwd().openDir(".", .{ .iterate = true });

    var iterator = dir.iterate();

    while (try iterator.next()) |entry| {
        const name = entry.name;
        std.debug.print("{s}\n", .{name});
    }
}