mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
parent
0450c12df5
commit
713ed065e7
6 changed files with 0 additions and 21 deletions
11
cli/tsc/dts/lib.deno.ns.d.ts
vendored
11
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -2530,17 +2530,6 @@ declare namespace Deno {
|
||||||
[Symbol.dispose](): void;
|
[Symbol.dispose](): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The Deno abstraction for reading and writing files.
|
|
||||||
*
|
|
||||||
* @deprecated This will be removed in Deno 2.0. See the
|
|
||||||
* {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
|
|
||||||
* for migration instructions.
|
|
||||||
*
|
|
||||||
* @category File System
|
|
||||||
*/
|
|
||||||
export const File: typeof FsFile;
|
|
||||||
|
|
||||||
/** Gets the size of the console as columns/rows.
|
/** Gets the size of the console as columns/rows.
|
||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
|
|
|
@ -786,8 +786,6 @@ function checkOpenOptions(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const File = FsFile;
|
|
||||||
|
|
||||||
function readFileSync(path) {
|
function readFileSync(path) {
|
||||||
return op_fs_read_file_sync(pathFromURL(path));
|
return op_fs_read_file_sync(pathFromURL(path));
|
||||||
}
|
}
|
||||||
|
@ -950,7 +948,6 @@ export {
|
||||||
cwd,
|
cwd,
|
||||||
fdatasync,
|
fdatasync,
|
||||||
fdatasyncSync,
|
fdatasyncSync,
|
||||||
File,
|
|
||||||
FsFile,
|
FsFile,
|
||||||
fsync,
|
fsync,
|
||||||
fsyncSync,
|
fsyncSync,
|
||||||
|
|
|
@ -801,7 +801,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
|
||||||
if (internals.future) {
|
if (internals.future) {
|
||||||
delete globalThis.window;
|
delete globalThis.window;
|
||||||
delete Deno.Buffer;
|
delete Deno.Buffer;
|
||||||
delete Deno.File;
|
|
||||||
delete Deno.FsFile.prototype.rid;
|
delete Deno.FsFile.prototype.rid;
|
||||||
delete Deno.funlock;
|
delete Deno.funlock;
|
||||||
delete Deno.funlockSync;
|
delete Deno.funlockSync;
|
||||||
|
@ -965,7 +964,6 @@ function bootstrapWorkerRuntime(
|
||||||
|
|
||||||
if (internals.future) {
|
if (internals.future) {
|
||||||
delete Deno.Buffer;
|
delete Deno.Buffer;
|
||||||
delete Deno.File;
|
|
||||||
delete Deno.FsFile.prototype.rid;
|
delete Deno.FsFile.prototype.rid;
|
||||||
delete Deno.funlock;
|
delete Deno.funlock;
|
||||||
delete Deno.funlockSync;
|
delete Deno.funlockSync;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
console.log("window is", globalThis.window);
|
console.log("window is", globalThis.window);
|
||||||
console.log("Deno.Buffer is", Deno.Buffer);
|
console.log("Deno.Buffer is", Deno.Buffer);
|
||||||
console.log("Deno.File is", Deno.File);
|
|
||||||
console.log(
|
console.log(
|
||||||
"Deno.FsFile.prototype.rid is",
|
"Deno.FsFile.prototype.rid is",
|
||||||
Deno.openSync(import.meta.filename).rid,
|
Deno.openSync(import.meta.filename).rid,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
window is undefined
|
window is undefined
|
||||||
Deno.Buffer is undefined
|
Deno.Buffer is undefined
|
||||||
Deno.File is undefined
|
|
||||||
Deno.FsFile.prototype.rid is undefined
|
Deno.FsFile.prototype.rid is undefined
|
||||||
Deno.funlock is undefined
|
Deno.funlock is undefined
|
||||||
Deno.funlockSync is undefined
|
Deno.funlockSync is undefined
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
// deno-lint-ignore-file no-deprecated-deno-api
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
assert,
|
assert,
|
||||||
assertEquals,
|
assertEquals,
|
||||||
|
@ -24,7 +22,6 @@ Deno.test(
|
||||||
async function filesCopyToStdout() {
|
async function filesCopyToStdout() {
|
||||||
const filename = "tests/testdata/assets/fixture.json";
|
const filename = "tests/testdata/assets/fixture.json";
|
||||||
using file = await Deno.open(filename);
|
using file = await Deno.open(filename);
|
||||||
assert(file instanceof Deno.File);
|
|
||||||
assert(file instanceof Deno.FsFile);
|
assert(file instanceof Deno.FsFile);
|
||||||
assert(file.rid > 2);
|
assert(file.rid > 2);
|
||||||
const bytesWritten = await copy(file, Deno.stdout);
|
const bytesWritten = await copy(file, Deno.stdout);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue