Changes the permission of a specific file/directory of specified path.Ignores the process's umask.
Synchronously changes the permission of a specific file/directory ofspecified path. Ignores the process's umask.
Change owner of a regular file or directory.
Synchronously change owner of a regular file or directory.
Copies the contents and permissions of one file to another specified path,by default creating a new file if needed, else overwriting. Fails if targetpath is a directory or is unwritable.
Synchronously copies the contents and permissions of one file to anotherspecified path, by default creating a new file if needed, else overwriting.Fails if target path is a directory or is unwritable.
Creates a file if none exists or truncates an existing file and resolves toan instance of Deno.FsFile
.
Creates a file if none exists or truncates an existing file and returnsan instance of Deno.FsFile
.
Creates newpath
as a hard link to oldpath
.
Synchronously creates newpath
as a hard link to oldpath
.
Resolves to a Deno.FileInfo
for the specified path
. Ifpath
is a symlink, information for the symlink will be returned insteadof what it points to.
Synchronously returns a Deno.FileInfo
for the specifiedpath
. If path
is a symlink, information for the symlink will bereturned instead of what it points to.
Creates a new temporary directory in the default directory for temporaryfiles, unless dir
is specified. Other optional options includeprefixing and suffixing the directory name with prefix
and suffix
respectively.
Synchronously creates a new temporary directory in the default directoryfor temporary files, unless dir
is specified. Other optional optionsinclude prefixing and suffixing the directory name with prefix
andsuffix
respectively.
Creates a new temporary file in the default directory for temporaryfiles, unless dir
is specified.
Synchronously creates a new temporary file in the default directory fortemporary files, unless dir
is specified.
Creates a new directory with the specified path.
Synchronously creates a new directory with the specified path.
Open a file and resolve to an instance of Deno.FsFile
. Thefile does not need to previously exist if using the create
or createNew
open options. The caller may have the resulting file automatically closedby the runtime once it's out of scope by declaring the file variable withthe using
keyword.
Synchronously open a file and return an instance ofDeno.FsFile
. The file does not need to previously exist ifusing the create
or createNew
open options. The caller may have theresulting file automatically closed by the runtime once it's out of scopeby declaring the file variable with the using
keyword.
Reads the directory given by path
and returns an async iterable ofDeno.DirEntry
. The order of entries is not guaranteed.
Synchronously reads the directory given by path
and returns an iterableof Deno.DirEntry
. The order of entries is not guaranteed.
Reads and resolves to the entire contents of a file as an array of bytes.TextDecoder
can be used to transform the bytes to string if required.Reading a directory returns an empty data array.
Synchronously reads and returns the entire contents of a file as an arrayof bytes. TextDecoder
can be used to transform the bytes to string ifrequired. Reading a directory returns an empty data array.
Resolves to the full path destination of the named symbolic link.
Synchronously returns the full path destination of the named symboliclink.
Asynchronously reads and returns the entire contents of a file as an UTF-8decoded string. Reading a directory throws an error.
Synchronously reads and returns the entire contents of a file as an UTF-8decoded string. Reading a directory throws an error.
Resolves to the absolute normalized path, with symbolic links resolved.
Synchronously returns absolute normalized path, with symbolic linksresolved.
Removes the named file or directory.
Synchronously removes the named file or directory.
Renames (moves) oldpath
to newpath
. Paths may be files or directories.If newpath
already exists and is not a directory, rename()
replaces it.OS-specific restrictions may apply when oldpath
and newpath
are indifferent directories.
Synchronously renames (moves) oldpath
to newpath
. Paths may be files ordirectories. If newpath
already exists and is not a directory,renameSync()
replaces it. OS-specific restrictions may apply whenoldpath
and newpath
are in different directories.
Resolves to a Deno.FileInfo
for the specified path
. Willalways follow symlinks.
Synchronously returns a Deno.FileInfo
for the specifiedpath
. Will always follow symlinks.
Creates newpath
as a symbolic link to oldpath
.
Creates newpath
as a symbolic link to oldpath
.
Truncates (or extends) the specified file, to reach the specified len
.If len
is not specified then the entire file contents are truncated.
Synchronously truncates (or extends) the specified file, to reach thespecified len
. If len
is not specified then the entire file contentsare truncated.
Retrieve the process umask. If mask
is provided, sets the process umask.This call always returns what the umask was before the call.
Changes the access (atime
) and modification (mtime
) times of a filesystem object referenced by path
. Given times are either in seconds(UNIX epoch time) or as Date
objects.
Synchronously changes the access (atime
) and modification (mtime
) timesof a file system object referenced by path
. Given times are either inseconds (UNIX epoch time) or as Date
objects.
Watch for file system events against one or more paths
, which can befiles or directories. These paths must exist already. One user action (e.g.touch test.file
) can generate multiple file system events. Likewise,one user action can result in multiple file paths in one event (e.g. mv old_name.txt new_name.txt
).
Write data
to the given path
, by default creating a new file ifneeded, else overwriting.
Synchronously write data
to the given path
, by default creating a newfile if needed, else overwriting.
Write string data
to the given path
, by default creating a new file ifneeded, else overwriting.
Synchronously write string data
to the given path
, by default creatinga new file if needed, else overwriting.
Information about a directory entry returned from Deno.readDir
and Deno.readDirSync
.
Provides information about a file and is returned byDeno.stat
, Deno.lstat
, Deno.statSync
,and Deno.lstatSync
or from calling stat()
and statSync()
on an Deno.FsFile
instance.
Returned by Deno.watchFs
. It is an async iterator yielding upsystem events. To stop watching the file system by calling .close()
method.
Options which can be set when using Deno.makeTempDir
,Deno.makeTempDirSync
, Deno.makeTempFile
, andDeno.makeTempFileSync
.
Options which can be set when doing Deno.open
andDeno.openSync
.
Additional information for FsEvent objects with the "other" kind.