Skip to main content
Module

x/uuid/lib/lib.deno_runtime.d.ts>Deno

Deprecated! UUID is part of the deno standard library
Latest
namespace Deno
import { Deno } from "https://deno.land/x/uuid@v0.1.2/lib/lib.deno_runtime.d.ts";

Classes

A Buffer is a variable-sized buffer of bytes with read() and write() methods. Based on https://golang.org/pkg/bytes/#Buffer

A Deno specific error. The kind property is set to a specific error code which can be used to in application logic.

The Deno abstraction for reading and writing files.

Variables

Path to the current deno process's executable file.

Reflects the NO_COLOR environment variable: https://no-color.org/

The current process id of the runtime.

Signals numbers. This is platform dependent.

An instance of File for stderr.

An instance of File for stdin.

An instance of File for stdout.

Functions

chdir() Change the current working directory to path. throws NotFound exception if directory not available

Changes the permission of a specific file/directory of specified path.

Changes the permission of a specific file/directory of specified path synchronously.

Close the file ID.

RESERVED

Copies from src to dst until either EOF is reached on src or an error occurs. It returns the number of bytes copied and the first error encountered while copying, if any.

Copies the contents of a file to another by name.

Copies the contents of a file to another by name synchronously. Creates a new file if target does not exists, and if target exists, overwrites original content of the target file.

cwd() Return a string representing the current working directory. If the current directory can be reached via multiple paths (due to symbolic links), cwd() may return any one of them. throws NotFound exception if directory not available

Dial connects to the address on the named network.

Returns a snapshot of the environment variables at invocation. Mutating a property in the object will set that variable in the environment for the process. The environment object will only accept strings as values.

Exit the Deno process with optional exit code.

inspect() converts input into string that has the same format as printed by console.log(...);

Check if running in terminal.

Send a signal to process under given PID. Unix only at this moment. If pid is negative, the signal will be sent to the process group identified by -pid.

Creates newname as a hard link to oldname.

Synchronously creates newname as a hard link to oldname.

Listen announces on the local network address.

Queries the file system for information on the path provided. If the given path is a symlink information about the symlink will be returned.

Queries the file system for information on the path provided synchronously. If the given path is a symlink information about the symlink will be returned.

makeTempDir creates a new temporary directory in the directory dir, its name beginning with prefix and ending with suffix. It returns the full path to the newly created directory. If dir is unspecified, tempDir uses the default directory for temporary files. Multiple programs calling tempDir simultaneously will not choose the same directory. It is the caller's responsibility to remove the directory when no longer needed.

makeTempDirSync is the synchronous version of makeTempDir.

Receive metrics from the privileged side of Deno.

Creates a new directory with the specified path. If recursive is set to true, nested directories will be created (also known as "mkdir -p"). mode sets permission bits (before umask) on UNIX and does nothing on Windows.

Creates a new directory with the specified path synchronously. If recursive is set to true, nested directories will be created (also known as "mkdir -p"). mode sets permission bits (before umask) on UNIX and does nothing on Windows.

Open a file and return an instance of the File object.

Open a file and return an instance of the File object synchronously.

Inspect granted permissions for the current program.

Read from a file ID into an array buffer.

Read r until EOF and return the content as Uint8Array.

Read synchronously r until EOF and return the content as Uint8Array.

Reads the directory given by path and returns a list of file info.

Reads the directory given by path and returns a list of file info synchronously.

Read the entire contents of a file.

Read the entire contents of a file synchronously.

Returns the destination of the named symbolic link.

Returns the destination of the named symbolic link synchronously.

Read synchronously from a file ID into an array buffer.

Removes the named file or directory. Would throw error if permission denied, not found, or directory not empty if recursive set to false. recursive is set to false by default.

Removes the named file or directory synchronously. Would throw error if permission denied, not found, or directory not empty if recursive set to false. recursive is set to false by default.

Renames (moves) oldpath to newpath. If newpath already exists and is not a directory, rename() replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.

Synchronously renames (moves) oldpath to newpath. If newpath already exists and is not a directory, renameSync() replaces it. OS-specific restrictions may apply when oldpath and newpath are in different directories.

Returns a map of open file like resource ids along with their string representation.

Revoke a permission. When the permission was already revoked nothing changes

Spawns new subprocess.

Seek a file ID to the given offset under mode given by whence.

Seek a file ID synchronously to the given offset under mode given by whence.

Queries the file system for information on the path provided. stat Will always follow symlinks.

Queries the file system for information on the path provided synchronously. statSync Will always follow symlinks.

Creates newname as a symbolic link to oldname. The type argument can be set to dir or file and is only available on Windows (ignored on other platforms).

Synchronously creates newname as a symbolic link to oldname. The type argument can be set to dir or file and is only available on Windows (ignored on other platforms).

Turns r into async iterator.

Truncates or extends the specified file, updating the size of this file to become size.

Truncates or extends the specified file synchronously, updating the size of this file to become size.

Write to the file ID the contents of the array buffer.

Write a new file, with given filename and data.

Write a new file, with given filename and data synchronously.

Write synchronously to the file ID the contents of the array buffer.

Interfaces

A FileInfo describes a file and is returned by stat, lstat, statSync, lstatSync.

A Listener is a generic network listener for stream-oriented protocols.

Permissions as granted by the caller

Options for writing to a file. perm would change the file's permission if set. create decides if the file should be created if not exists (default: true) append decides if the file should be appended (default: false)