From e7a654d530f132b8dc1eb9b4c009a7d2a732897f Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Mon, 6 Jan 2025 05:51:40 +0000 Subject: [PATCH] chore(examples): update example to use test file --- examples/tour.luau | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tour.luau b/examples/tour.luau index b3e031e..ed97c28 100644 --- a/examples/tour.luau +++ b/examples/tour.luau @@ -2,14 +2,14 @@ local fs = require("@lune/fs") local stdio = require("@lune/stdio") local zip = require("../lib") -local file = fs.readFile("test.zip") +local file = fs.readFile("tests/data/files_and_dirs.zip") local reader = zip.load(buffer.fromstring(file)) print("Directory structure:") reader:walk(function(entry, depth) local prefix = string.rep(" ", depth) local suffix = if not entry.isDirectory - then string.format(" (%d bytes), content: %s", entry.size, stdio.format(reader:extract(entry) :: string)) + then string.format(" (%d bytes), content: %s", entry.size, reader:extract(entry, { isString = true }) :: string) else "" print(prefix .. entry.name .. suffix) end)