Provides operations related to working with files in the effect F
.
An instance is available for any effect F
which has an Async[F]
instance.
The operations on this trait are implemented for both the JVM and Node.js. Some operations only work on POSIX file systems, though such methods generally have "Posix" in their names (e.g. getPosixPermissions
). A small number of methods are only available on the JVM (e.g. variant of list
which takes a glob pattern) and are indicated as such in their ScalaDoc.
Attributes
- Companion
- object
- Source
- Files.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Copies the source to the target, following any directives supplied in the flags. By default, an error occurs if the target already exists, though this can be overriden via CopyFlag.ReplaceExisting
.
Copies the source to the target, following any directives supplied in the flags. By default, an error occurs if the target already exists, though this can be overriden via CopyFlag.ReplaceExisting
.
Attributes
- Source
- Files.scala
Creates the specified directory and any parent directories, using the supplied permissions for any directories that get created as a result of this operation. For example if /a
exists and createDirectories(Path("/a/b/c"), Some(p))
is called, /a/b
and /a/b/c
are created with permissions set to p
on each (and the permissions of /a
remain unmodified).
Creates the specified directory and any parent directories, using the supplied permissions for any directories that get created as a result of this operation. For example if /a
exists and createDirectories(Path("/a/b/c"), Some(p))
is called, /a/b
and /a/b/c
are created with permissions set to p
on each (and the permissions of /a
remain unmodified).
Attributes
- Source
- Files.scala
Creates the specified directory with the specified permissions. Fails if the parent path does not already exist.
Creates the specified directory with the specified permissions. Fails if the parent path does not already exist.
Attributes
- Source
- Files.scala
Creates the specified file with the specified permissions. Fails if the parent path does not already exist.
Creates the specified file with the specified permissions. Fails if the parent path does not already exist.
Attributes
- Source
- Files.scala
Creates a hard link with an existing file.
Creates a symbolic link which points to the supplied target. If defined, the supplied permissions are set on the created link.
Creates a symbolic link which points to the supplied target. If defined, the supplied permissions are set on the created link.
Attributes
- Source
- Files.scala
Creates a temporary directory. The created directory is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempDirectory
to get a resource which deletes upon resource finalization.
Creates a temporary directory. The created directory is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempDirectory
to get a resource which deletes upon resource finalization.
Value parameters
- dir
-
the directory which the temporary directory will be created in. Pass none to use the default system temp directory
- permissions
-
permissions to set on the created directory
- prefix
-
the prefix string to be used in generating the directory's name
Attributes
- Source
- Files.scala
Creates a temporary file. The created file is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempFile
to get a resource which deletes upon resource finalization.
Creates a temporary file. The created file is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempFile
to get a resource which deletes upon resource finalization.
Value parameters
- dir
-
the directory which the temporary file will be created in. Pass none to use the default system temp directory
- permissions
-
permissions to set on the created file
- prefix
-
the prefix string to be used in generating the file's name
- suffix
-
the suffix string to be used in generating the file's name
Attributes
- Source
- Files.scala
User's current working directory
Deletes the specified file or empty directory, failing if it does not exist.
Deletes the specified file or empty directory, failing if it does not exist.
Attributes
- Source
- Files.scala
Deletes the specified file or empty directory, passing if it does not exist.
Deletes the specified file or empty directory, passing if it does not exist.
Attributes
- Source
- Files.scala
Deletes the specified file or directory. If the path is a directory and is non-empty, its contents are recursively deleted. Symbolic links are followed when followLinks
is true.
Deletes the specified file or directory. If the path is a directory and is non-empty, its contents are recursively deleted. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Returns true if the specified path exists. Symbolic links are followed when followLinks
is true. For example, if the symbolic link foo
points to bar
and bar
does not exist, exists(Path("foo"), true)
returns false
but exists(Path("foo"), false)
returns true
.
Returns true if the specified path exists. Symbolic links are followed when followLinks
is true. For example, if the symbolic link foo
points to bar
and bar
does not exist, exists(Path("foo"), true)
returns false
but exists(Path("foo"), false)
returns true
.
Attributes
- Source
- Files.scala
Gets BasicFileAttributes
for the supplied path. Symbolic links are not followed when followLinks
is true.
Gets BasicFileAttributes
for the supplied path. Symbolic links are not followed when followLinks
is true.
Attributes
- Source
- Files.scala
Gets the last modified time of the supplied path. The last modified time is represented as a duration since the Unix epoch. Symbolic links are followed when followLinks
is true.
Gets the last modified time of the supplied path. The last modified time is represented as a duration since the Unix epoch. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Gets the POSIX attributes for the supplied path. Symbolic links are followed when followLinks
is true.
Gets the POSIX attributes for the supplied path. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Gets the POSIX permissions of the supplied path. Symbolic links are followed when followLinks
is true.
Gets the POSIX permissions of the supplied path. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Returns true if the supplied path exists and is a directory. Symbolic links are followed when followLinks
is true.
Returns true if the supplied path exists and is a directory. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Returns true if the supplied path exists and is executable.
Returns true if the supplied path is a hidden file (note: may not check for existence).
Returns true if the supplied path is a hidden file (note: may not check for existence).
Attributes
- Source
- Files.scala
Returns true if the supplied path exists and is readable.
Returns true if the supplied path is a regular file. Symbolic links are followed when followLinks
is true.
Returns true if the supplied path is a regular file. Symbolic links are followed when followLinks
is true.
Attributes
- Source
- Files.scala
Returns true if the supplied paths reference the same file.
Returns true if the supplied path is a symbolic link.
Returns true if the supplied path exists and is writable.
Returns the line separator for the specific OS
Gets the contents of the specified directory.
Moves the source to the target, following any directives supplied in the flags. By default, an error occurs if the target already exists, though this can be overriden via CopyFlag.ReplaceExisting
.
Moves the source to the target, following any directives supplied in the flags. By default, an error occurs if the target already exists, though this can be overriden via CopyFlag.ReplaceExisting
.
Attributes
- Source
- Files.scala
Creates a FileHandle
for the file at the supplied Path
. The supplied flags indicate the mode used when opening the file (e.g. read, write, append) as well as the ability to specify additional options (e.g. automatic deletion at process exit).
Creates a FileHandle
for the file at the supplied Path
. The supplied flags indicate the mode used when opening the file (e.g. read, write, append) as well as the ability to specify additional options (e.g. automatic deletion at process exit).
Attributes
- Source
- Files.scala
Reads all bytes from the file specified, reading in chunks up to the specified limit, and using the supplied flags to open the file.
Reads all bytes from the file specified, reading in chunks up to the specified limit, and using the supplied flags to open the file.
Attributes
- Source
- Files.scala
Reads a range of data synchronously from the file at the specified path. start
is inclusive, end
is exclusive, so when start
is 0 and end
is 2, two bytes are read.
Reads a range of data synchronously from the file at the specified path. start
is inclusive, end
is exclusive, so when start
is 0 and end
is 2, two bytes are read.
Attributes
- Source
- Files.scala
Returns the real path i.e. the actual location of path
. The precise definition of this method is implementation dependent but in general it derives from this path, an absolute path that locates the same file as this path, but with name elements that represent the actual name of the directories and the file.
Returns the real path i.e. the actual location of path
. The precise definition of this method is implementation dependent but in general it derives from this path, an absolute path that locates the same file as this path, but with name elements that represent the actual name of the directories and the file.
Attributes
- Source
- Files.scala
Sets the last modified, last access, and creation time fields of the specified path.
Sets the last modified, last access, and creation time fields of the specified path.
Times which are supplied as None
are not modified. E.g., setTimes(p, Some(t), Some(t), None, false)
sets the last modified and last access time to t
and does not change the creation time.
If the path is a symbolic link and followLinks
is true, the target of the link as times set. Otherwise, the link itself has times set.
Attributes
- Source
- Files.scala
Sets the POSIX permissions for the supplied path. Fails on non-POSIX file systems.
Sets the POSIX permissions for the supplied path. Fails on non-POSIX file systems.
Attributes
- Source
- Files.scala
Gets the size of the supplied path, failing if it does not exist.
Returns an infinite stream of data from the file at the specified path. Starts reading from the specified offset and upon reaching the end of the file, polls every pollDuration
for additional updates to the file.
Returns an infinite stream of data from the file at the specified path. Starts reading from the specified offset and upon reaching the end of the file, polls every pollDuration
for additional updates to the file.
Read operations are limited to emitting chunks of the specified chunk size but smaller chunks may occur.
If an error occurs while reading from the file, the overall stream fails.
Attributes
- Source
- Files.scala
Creates a temporary directory and deletes it upon finalization of the returned resource.
Creates a temporary directory and deletes it upon finalization of the returned resource.
Value parameters
- dir
-
the directory which the temporary directory will be created in. Pass in None to use the default system temp directory
- permissions
-
permissions to set on the created file
- prefix
-
the prefix string to be used in generating the directory's name
Attributes
- Returns
-
a resource containing the path of the temporary directory
- Source
- Files.scala
Creates a temporary file and deletes it upon finalization of the returned resource.
Creates a temporary file and deletes it upon finalization of the returned resource.
Value parameters
- dir
-
the directory which the temporary file will be created in. Pass in None to use the default system temp directory
- permissions
-
permissions to set on the created file
- prefix
-
the prefix string to be used in generating the file's name
- suffix
-
the suffix string to be used in generating the file's name
Attributes
- Returns
-
a resource containing the path of the temporary file
- Source
- Files.scala
User's home directory
Creates a stream of paths contained in a given file tree down to a given depth.
Creates a stream of paths contained in a given file tree down to a given depth.
Attributes
- Source
- Files.scala
Writes all data to the file at the specified path, using the specified flags to open the file.
Writes all data to the file at the specified path, using the specified flags to open the file.
Attributes
- Source
- Files.scala
Returns a WriteCursor
for the specified path.
Returns a WriteCursor
for the specified file handle.
Returns a WriteCursor
for the specified file handle.
If append
is true, the offset is initialized to the current size of the file.
Attributes
- Source
- Files.scala
Writes all data to a sequence of files, each limited in size to limit
.
Writes all data to a sequence of files, each limited in size to limit
.
The computePath
operation is used to compute the path of the first file and every subsequent file. Typically, the next file should be determined by analyzing the current state of the filesystem -- e.g., by looking at all files in a directory and generating a unique name.
Attributes
- Source
- Files.scala
Concrete methods
Copies the source to the target, failing if source does not exist or the target already exists. To replace the existing instead, use copy(source, target, CopyFlags(CopyFlag.ReplaceExisting))
.
Copies the source to the target, failing if source does not exist or the target already exists. To replace the existing instead, use copy(source, target, CopyFlags(CopyFlag.ReplaceExisting))
.
Attributes
- Source
- Files.scala
Creates the specified directory and any non-existant parent directories.
Creates the specified directory and any non-existant parent directories.
Attributes
- Source
- Files.scala
Creates the specified directory. Fails if the parent path does not already exist.
Creates the specified directory. Fails if the parent path does not already exist.
Attributes
- Source
- Files.scala
Creates the specified file. Fails if the parent path does not already exist.
Creates the specified file. Fails if the parent path does not already exist.
Attributes
- Source
- Files.scala
Creates a symbolic link which points to the supplied target.
Creates a temporary directory. The created directory is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempDirectory
to get a resource which deletes upon resource finalization.
Creates a temporary directory. The created directory is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempDirectory
to get a resource which deletes upon resource finalization.
Attributes
- Source
- Files.scala
Creates a temporary file. The created file is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempFile
to get a resource, which is deleted upon resource finalization.
Creates a temporary file. The created file is not automatically deleted - it is up to the operating system to decide when the file is deleted. Alternatively, use tempFile
to get a resource, which is deleted upon resource finalization.
Attributes
- Source
- Files.scala
Deletes the specified file or directory. If the path is a directory and is non-empty, its contents are recursively deleted. Symbolic links are not followed (but are deleted).
Deletes the specified file or directory. If the path is a directory and is non-empty, its contents are recursively deleted. Symbolic links are not followed (but are deleted).
Attributes
- Source
- Files.scala
Returns true if the specified path exists. Symbolic links are followed -- see the overload for more details on links.
Returns true if the specified path exists. Symbolic links are followed -- see the overload for more details on links.
Attributes
- Source
- Files.scala
Gets BasicFileAttributes
for the supplied path. Symbolic links are not followed.
Gets BasicFileAttributes
for the supplied path. Symbolic links are not followed.
Attributes
- Source
- Files.scala
Gets the last modified time of the supplied path. The last modified time is represented as a duration since the Unix epoch. Symbolic links are followed.
Gets the last modified time of the supplied path. The last modified time is represented as a duration since the Unix epoch. Symbolic links are followed.
Attributes
- Source
- Files.scala
Gets the POSIX attributes for the supplied path. Symbolic links are not followed.
Gets the POSIX attributes for the supplied path. Symbolic links are not followed.
Attributes
- Source
- Files.scala
Gets the POSIX permissions of the supplied path. Symbolic links are followed.
Gets the POSIX permissions of the supplied path. Symbolic links are followed.
Attributes
- Source
- Files.scala
Returns true if the supplied path exists and is a directory. Symbolic links are followed.
Returns true if the supplied path exists and is a directory. Symbolic links are followed.
Attributes
- Source
- Files.scala
Returns true if the supplied path is a regular file. Symbolic links are followed.
Returns true if the supplied path is a regular file. Symbolic links are followed.
Attributes
- Source
- Files.scala
Moves the source to the target, failing if source does not exist or the target already exists. To replace the existing instead, use move(source, target, CopyFlags(CopyFlag.ReplaceExisting))
.
Moves the source to the target, failing if source does not exist or the target already exists. To replace the existing instead, use move(source, target, CopyFlags(CopyFlag.ReplaceExisting))
.
Attributes
- Source
- Files.scala
Reads all bytes from the file specified.
Returns a ReadCursor
for the specified path, using the supplied flags when opening the file.
Returns a ReadCursor
for the specified path, using the supplied flags when opening the file.
Attributes
- Source
- Files.scala
Reads all bytes from the file specified and decodes them as a utf8 string.
Reads all bytes from the file specified and decodes them as a utf8 string.
Attributes
- Source
- Files.scala
Reads all bytes from the file specified and decodes them as utf8 lines.
Reads all bytes from the file specified and decodes them as utf8 lines.
Attributes
- Source
- Files.scala
Creates a temporary directory and deletes it upon finalization of the returned resource.
Creates a temporary directory and deletes it upon finalization of the returned resource.
Attributes
- Source
- Files.scala
Creates a temporary file and deletes it upon finalization of the returned resource.
Creates a temporary file and deletes it upon finalization of the returned resource.
Attributes
- Source
- Files.scala
Creates a stream of paths contained in a given file tree. Depth is unlimited.
Creates a stream of paths contained in a given file tree. Depth is unlimited.
Attributes
- Source
- Files.scala
Writes all data to the file at the specified path.
Writes all data to the file at the specified path.
The file is created if it does not exist and is truncated. Use writeAll(path, Flags.Append)
to append to the end of the file, or pass other flags to further customize behavior.
Attributes
- Source
- Files.scala
Writes to the specified file as an utf8 string.
Writes to the specified file as an utf8 string.
The file is created if it does not exist and is truncated. Use writeUtf8(path, Flags.Append)
to append to the end of the file, or pass other flags to further customize behavior.
Attributes
- Source
- Files.scala
Writes to the specified file as an utf8 string using the specified flags to open the file.
Writes to the specified file as an utf8 string using the specified flags to open the file.
Attributes
- Source
- Files.scala
Writes each string to the specified file as utf8 lines.
Writes each string to the specified file as utf8 lines.
The file is created if it does not exist and is truncated. Use writeUtf8Lines(path, Flags.Append)
to append to the end of the file, or pass other flags to further customize behavior.
Attributes
- Source
- Files.scala
Writes each string to the specified file as utf8 lines using the specified flags to open the file.
Writes each string to the specified file as utf8 lines using the specified flags to open the file.
Attributes
- Source
- Files.scala
Inherited methods
Attributes
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Gets the contents of the specified directory whose paths match the supplied glob pattern.
Gets the contents of the specified directory whose paths match the supplied glob pattern.
Example glob patterns: *.scala
, *.{scala,java}
JVM only.
Attributes
- Inherited from:
- FilesPlatform (hidden)
- Source
- FilesPlatform.scala
Creates a FileHandle
for the supplied NIO FileChannel
. JVM only.
Creates a FileHandle
for the supplied NIO FileChannel
. JVM only.
Attributes
- Inherited from:
- FilesPlatform (hidden)
- Source
- FilesPlatform.scala
Watches a single path.
Watches a single path.
Alias for creating a watcher and watching the supplied path, releasing the watcher when the resulting stream is finalized.
JVM only.
Attributes
- Inherited from:
- FilesPlatform (hidden)
- Source
- FilesPlatform.scala
Watches a single path.
Watches a single path.
Alias for creating a watcher and watching the supplied path, releasing the watcher when the resulting stream is finalized.
JVM only.
Attributes
- Inherited from:
- FilesPlatform (hidden)
- Source
- FilesPlatform.scala
Deprecated and Inherited methods
Copies a file from the source to the target path,
Copies a file from the source to the target path,
By default, the copy fails if the target file already exists or is a symbolic link.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a new directory at the given path and creates all nonexistent parent directories beforehand.
Creates a new directory at the given path and creates all nonexistent parent directories beforehand.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a new directory at the given path.
Creates a new directory at the given path.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Deletes a file.
Deletes a file.
If the file is a directory then the directory must be empty for this action to succeed. This action will fail if the path doesn't exist.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Recursively delete a directory
Recursively delete a directory
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Like delete
, but will not fail when the path doesn't exist.
Like delete
, but will not fail when the path doesn't exist.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of Path
s inside a directory which match the given glob.
Creates a stream of Path
s inside a directory which match the given glob.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of Path
s inside a directory, filtering the results by the given predicate.
Creates a stream of Path
s inside a directory, filtering the results by the given predicate.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of Path
s inside a directory.
Creates a stream of Path
s inside a directory.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Checks if a file exists.
Checks if a file exists.
Note that the result of this method is immediately outdated. If this method indicates the file exists then there is no guarantee that a subsequence access will succeed. Care should be taken when using this method in security sensitive applications.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Tests whether a file is a directory.
Tests whether a file is a directory.
The options sequence may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.
Where is it required to distinguish an I/O exception from the case that the file is not a directory then the file attributes can be read with the readAttributes method and the file type tested with the BasicFileAttributes.isDirectory() method.
Value parameters
- linkOption
-
- options indicating how symbolic links are handled
- path
-
the path to the file to test
Attributes
- Returns
-
true if the file is a directory; false if the file does not exist, is not a directory, or it cannot be determined if the file is a directory or not.
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Tests whether a file is a regular file with opaque content.
Tests whether a file is a regular file with opaque content.
The options sequence may be used to indicate how symbolic links are handled for the case that the file is a symbolic link. By default, symbolic links are followed and the file attribute of the final target of the link is read. If the option NOFOLLOW_LINKS is present then symbolic links are not followed.
Where is it required to distinguish an I/O exception from the case that the file is not a regular file then the file attributes can be read with the readAttributes method and the file type tested with the BasicFileAttributes.isRegularFile() method.
Value parameters
- linkOption
-
options indicating how symbolic links are handled
- path
-
the path to the file
Attributes
- Returns
-
true if the file is a regular file; false if the file does not exist, is not a regular file, or it cannot be determined if the file is a regular file or not.
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Moves (or renames) a file from the source to the target path.
Moves (or renames) a file from the source to the target path.
By default, the move fails if the target file already exists or is a symbolic link.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a FileHandle
for the file at the supplied Path
.
Creates a FileHandle
for the file at the supplied Path
.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Get file permissions as set of PosixFilePermission
.
Get file permissions as set of PosixFilePermission
.
Note: this will only work for POSIX supporting file systems.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Reads all data from the file at the specified java.nio.file.Path
.
Reads all data from the file at the specified java.nio.file.Path
.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Returns a ReadCursor
for the specified path. The READ
option is added to the supplied flags.
Returns a ReadCursor
for the specified path. The READ
option is added to the supplied flags.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Returns a ReadCursor
for the specified path.
Returns a ReadCursor
for the specified path.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Reads a range of data synchronously from the file at the specified java.nio.file.Path
. start
is inclusive, end
is exclusive, so when start
is 0 and end
is 2, two bytes are read.
Reads a range of data synchronously from the file at the specified java.nio.file.Path
. start
is inclusive, end
is exclusive, so when start
is 0 and end
is 2, two bytes are read.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Set file permissions from set of PosixFilePermission
.
Set file permissions from set of PosixFilePermission
.
Note: this will only work for POSIX supporting file systems.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Returns the size of a file (in bytes).
Returns the size of a file (in bytes).
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Returns an infinite stream of data from the file at the specified path. Starts reading from the specified offset and upon reaching the end of the file, polls every pollDuration
for additional updates to the file.
Returns an infinite stream of data from the file at the specified path. Starts reading from the specified offset and upon reaching the end of the file, polls every pollDuration
for additional updates to the file.
Read operations are limited to emitting chunks of the specified chunk size but smaller chunks may occur.
If an error occurs while reading from the file, the overall stream fails.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a Resource
which can be used to create a temporary directory. The directory is created during resource allocation, and removed during its release.
Creates a Resource
which can be used to create a temporary directory. The directory is created during resource allocation, and removed during its release.
Value parameters
- attributes
-
an optional list of file attributes to set atomically when creating the directory
- dir
-
the directory which the temporary directory will be created in. Pass in None to use the default system temp directory
- prefix
-
the prefix string to be used in generating the directory's name
Attributes
- Returns
-
a resource containing the path of the temporary directory
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a Resource
which can be used to create a temporary file. The file is created during resource allocation, and removed during its release.
Creates a Resource
which can be used to create a temporary file. The file is created during resource allocation, and removed during its release.
Value parameters
- attributes
-
an optional list of file attributes to set atomically when creating the file
- dir
-
the directory which the temporary file will be created in. Pass in None to use the default system temp directory
- prefix
-
the prefix string to be used in generating the file's name
- suffix
-
the suffix string to be used in generating the file's name
Attributes
- Returns
-
a resource containing the path of the temporary file
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of JPath
s contained in a given file tree down to a given depth.
Creates a stream of JPath
s contained in a given file tree down to a given depth.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of JPath
s contained in a given file tree, respecting the supplied options. Depth is unlimited.
Creates a stream of JPath
s contained in a given file tree, respecting the supplied options. Depth is unlimited.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a stream of JPath
s contained in a given file tree. Depth is unlimited.
Creates a stream of JPath
s contained in a given file tree. Depth is unlimited.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Watches a single path.
Watches a single path.
Alias for creating a watcher and watching the supplied path, releasing the watcher when the resulting stream is finalized.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Creates a Watcher for the default file system.
Creates a Watcher for the default file system.
The watcher is returned as a resource. To use the watcher, lift the resource to a stream, watch or register 1 or more paths, and then return watcher.events()
.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Writes all data to the file at the specified java.nio.file.JPath
.
Writes all data to the file at the specified java.nio.file.JPath
.
Adds the WRITE flag to any other OpenOption
flags specified. By default, also adds the CREATE flag.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Returns a WriteCursor
for the specified path.
Returns a WriteCursor
for the specified path.
The WRITE
option is added to the supplied flags. If the APPEND
option is present in flags
, the offset is initialized to the current size of the file.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Writes all data to a sequence of files, each limited in size to limit
.
Writes all data to a sequence of files, each limited in size to limit
.
The computePath
operation is used to compute the path of the first file and every subsequent file. Typically, the next file should be determined by analyzing the current state of the filesystem -- e.g., by looking at all files in a directory and generating a unique name.
Attributes
- Deprecated
- true
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala
Implicits
Inherited implicits
Attributes
- Inherited from:
- DeprecatedFilesApi (hidden)
- Source
- DeprecatedFilesApi.scala