about summary refs log tree commit diff
path: root/src/ls.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ls.zig12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ls.zig b/src/ls.zig
new file mode 100644
index 0000000..64e27cf
--- /dev/null
+++ b/src/ls.zig
@@ -0,0 +1,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});
+    }
+}