summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/archive/tar.ts2
-rwxr-xr-xstd/http/file_server.ts4
-rw-r--r--std/node/_fs/_fs_dirent_test.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/std/archive/tar.ts b/std/archive/tar.ts
index 33a9ae097..2680bcff2 100644
--- a/std/archive/tar.ts
+++ b/std/archive/tar.ts
@@ -334,7 +334,7 @@ export class Tar {
);
}
- const fileSize = info?.len ?? opts.contentSize;
+ const fileSize = info?.size ?? opts.contentSize;
assert(fileSize != null, "fileSize must be set");
const tarData: TarDataWithSource = {
fileName,
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index 28eaef44d..a259acb3c 100755
--- a/std/http/file_server.ts
+++ b/std/http/file_server.ts
@@ -102,7 +102,7 @@ async function serveFile(
): Promise<Response> {
const [file, fileInfo] = await Promise.all([open(filePath), stat(filePath)]);
const headers = new Headers();
- headers.set("content-length", fileInfo.len.toString());
+ headers.set("content-length", fileInfo.size.toString());
headers.set("content-type", "text/plain; charset=utf-8");
const res = {
@@ -135,7 +135,7 @@ async function serveDir(
} catch (e) {}
listEntry.push({
mode: modeToString(fileInfo.isDirectory(), mode),
- size: fileInfo.isFile() ? fileLenToString(fileInfo.len) : "",
+ size: fileInfo.isFile() ? fileLenToString(fileInfo.size) : "",
name: fileInfo.name ?? "",
url: fileUrl
});
diff --git a/std/node/_fs/_fs_dirent_test.ts b/std/node/_fs/_fs_dirent_test.ts
index 6fe0f4020..36091d3e1 100644
--- a/std/node/_fs/_fs_dirent_test.ts
+++ b/std/node/_fs/_fs_dirent_test.ts
@@ -3,7 +3,7 @@ import { assert, assertEquals, assertThrows } from "../../testing/asserts.ts";
import Dirent from "./_fs_dirent.ts";
class FileInfoMock implements Deno.FileInfo {
- len = -1;
+ size = -1;
modified = -1;
accessed = -1;
created = -1;