Packages

sealed trait Files[F[_]] extends FilesPlatform[F]

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.

Source
Files.scala
Linear Supertypes
FilesPlatform[F], DeprecatedFilesApi[F], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Files
  2. FilesPlatform
  3. DeprecatedFilesApi
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. implicit abstract val F: Async[F]
    Attributes
    protected
    Definition Classes
    DeprecatedFilesApi
  2. abstract def _runJavaCollectionResource[C <: AutoCloseable](javaCollection: F[C], collectionIterator: (C) => Iterator[java.nio.file.Path]): Stream[F, java.nio.file.Path]
    Attributes
    protected
    Definition Classes
    DeprecatedFilesApi
  3. abstract def copy(source: Path, target: Path, flags: CopyFlags): F[Unit]

    Copies the source to the target, following any directives supplied in the flags.

    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.

  4. abstract def createDirectories(path: Path, permissions: Option[Permissions]): F[Unit]

    Creates the specified directory and any parent directories, using the supplied permissions for any directories that get created as a result of this operation.

    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).

  5. abstract def createDirectory(path: Path, permissions: Option[Permissions]): F[Unit]

    Creates the specified directory with the specified permissions.

    Creates the specified directory with the specified permissions. Fails if the parent path does not already exist.

  6. abstract def createFile(path: Path, permissions: Option[Permissions]): F[Unit]

    Creates the specified file with the specified permissions.

    Creates the specified file with the specified permissions. Fails if the parent path does not already exist.

  7. abstract def createLink(link: Path, existing: Path): F[Unit]

    Creates a hard link with an existing file.

  8. abstract def createSymbolicLink(link: Path, target: Path, permissions: Option[Permissions]): F[Unit]

    Creates a symbolic link which points to the supplied target.

    Creates a symbolic link which points to the supplied target. If defined, the supplied permissions are set on the created link.

  9. abstract def createTempDirectory(dir: Option[Path], prefix: String, permissions: Option[Permissions]): F[Path]

    Creates a temporary directory.

    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.

    dir

    the directory which the temporary directory will be created in. Pass none to use the default system temp directory

    prefix

    the prefix string to be used in generating the directory's name

    permissions

    permissions to set on the created directory

  10. abstract def createTempFile(dir: Option[Path], prefix: String, suffix: String, permissions: Option[Permissions]): F[Path]

    Creates a temporary file.

    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.

    dir

    the directory which the temporary file will be created in. Pass 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

    permissions

    permissions to set on the created file

  11. abstract def currentWorkingDirectory: F[Path]

    User's current working directory

  12. abstract def delete(path: Path): F[Unit]

    Deletes the specified file or empty directory, failing if it does not exist.

  13. abstract def deleteIfExists(path: Path): F[Boolean]

    Deletes the specified file or empty directory, passing if it does not exist.

  14. abstract def deleteRecursively(path: Path, followLinks: Boolean): F[Unit]

    Deletes the specified file or directory.

    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.

  15. abstract def exists(path: Path, followLinks: Boolean): F[Boolean]

    Returns true if the specified path exists.

    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.

  16. abstract def getBasicFileAttributes(path: Path, followLinks: Boolean): F[BasicFileAttributes]

    Gets BasicFileAttributes for the supplied path.

    Gets BasicFileAttributes for the supplied path. Symbolic links are not followed when followLinks is true.

  17. abstract def getLastModifiedTime(path: Path, followLinks: Boolean): F[FiniteDuration]

    Gets the last modified time of the supplied path.

    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.

  18. abstract def getPosixFileAttributes(path: Path, followLinks: Boolean): F[PosixFileAttributes]

    Gets the POSIX attributes for the supplied path.

    Gets the POSIX attributes for the supplied path. Symbolic links are followed when followLinks is true.

  19. abstract def getPosixPermissions(path: Path, followLinks: Boolean): F[PosixPermissions]

    Gets the POSIX permissions of the supplied path.

    Gets the POSIX permissions of the supplied path. Symbolic links are followed when followLinks is true.

  20. abstract def isDirectory(path: Path, followLinks: Boolean): F[Boolean]

    Returns true if the supplied path exists and is a directory.

    Returns true if the supplied path exists and is a directory. Symbolic links are followed when followLinks is true.

  21. abstract def isExecutable(path: Path): F[Boolean]

    Returns true if the supplied path exists and is executable.

  22. abstract def isHidden(path: Path): F[Boolean]

    Returns true if the supplied path is a hidden file (note: may not check for existence).

  23. abstract def isReadable(path: Path): F[Boolean]

    Returns true if the supplied path exists and is readable.

  24. abstract def isRegularFile(path: Path, followLinks: Boolean): F[Boolean]

    Returns true if the supplied path is a regular file.

    Returns true if the supplied path is a regular file. Symbolic links are followed when followLinks is true.

  25. abstract def isSameFile(path1: Path, path2: Path): F[Boolean]

    Returns true if the supplied paths reference the same file.

  26. abstract def isSymbolicLink(path: Path): F[Boolean]

    Returns true if the supplied path is a symbolic link.

  27. abstract def isWritable(path: Path): F[Boolean]

    Returns true if the supplied path exists and is writable.

  28. abstract def list(path: Path): Stream[F, Path]

    Gets the contents of the specified directory.

  29. abstract def list(path: Path, glob: String): Stream[F, Path]

    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.

    Definition Classes
    FilesPlatform
  30. abstract def move(source: Path, target: Path, flags: CopyFlags): F[Unit]

    Moves the source to the target, following any directives supplied in the flags.

    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.

  31. abstract def open(path: Path, flags: Flags): Resource[F, FileHandle[F]]

    Creates a FileHandle for the file at the supplied Path.

    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).

  32. abstract def openFileChannel(channel: F[FileChannel]): Resource[F, FileHandle[F]]

    Creates a FileHandle for the supplied NIO FileChannel.

    Creates a FileHandle for the supplied NIO FileChannel. JVM only.

    Definition Classes
    FilesPlatform
  33. abstract def readAll(path: Path, chunkSize: Int, flags: Flags): Stream[F, Byte]

    Reads all bytes from the file specified, reading in chunks up to the specified limit, and using the supplied flags to open the file.

  34. abstract def readCursor(path: Path, flags: Flags): Resource[F, ReadCursor[F]]

    Returns a ReadCursor for the specified path, using the supplied flags when opening the file.

  35. abstract def readRange(path: Path, chunkSize: Int, start: Long, end: Long): Stream[F, Byte]

    Reads a range of data synchronously from the file at the specified path.

    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.

  36. abstract def readUtf8(path: Path): Stream[F, String]

    Reads all bytes from the file specified and decodes them as a utf8 string.

  37. abstract def readUtf8Lines(path: Path): Stream[F, String]

    Reads all bytes from the file specified and decodes them as utf8 lines.

  38. abstract def realPath(path: Path): F[Path]

    Returns the real path i.e.

    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.

  39. abstract def setFileTimes(path: Path, lastModified: Option[FiniteDuration], lastAccess: Option[FiniteDuration], creationTime: Option[FiniteDuration], followLinks: Boolean): F[Unit]

    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.

  40. abstract def setPosixPermissions(path: Path, permissions: PosixPermissions): F[Unit]

    Sets the POSIX permissions for the supplied path.

    Sets the POSIX permissions for the supplied path. Fails on non-POSIX file systems.

  41. abstract def size(path: Path): F[Long]

    Gets the size of the supplied path, failing if it does not exist.

  42. abstract def tail(path: Path, chunkSize: Int = 64 * 1024, offset: Long = 0L, pollDelay: FiniteDuration = 1.second): Stream[F, Byte]

    Returns an infinite stream of data from the file at the specified path.

    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.

  43. abstract def tempDirectory(dir: Option[Path], prefix: String, permissions: Option[Permissions]): Resource[F, Path]

    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.

    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

    permissions

    permissions to set on the created file

    returns

    a resource containing the path of the temporary directory

  44. abstract def tempFile(dir: Option[Path], prefix: String, suffix: String, permissions: Option[Permissions]): Resource[F, Path]

    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.

    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

    permissions

    permissions to set on the created file

    returns

    a resource containing the path of the temporary file

  45. abstract def userHome: F[Path]

    User's home directory

  46. abstract def walk(start: Path, maxDepth: Int, followLinks: Boolean): Stream[F, Path]

    Creates a stream of paths contained in a given file tree down to a given depth.

  47. abstract def watch(path: Path, types: Seq[EventType], modifiers: Seq[Modifier], pollTimeout: FiniteDuration): Stream[F, Event]

    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.

    Definition Classes
    FilesPlatform
  48. abstract def writeAll(path: Path, flags: Flags): Pipe[F, Byte, Nothing]

    Writes all data to the file at the specified path, using the specified flags to open the file.

  49. abstract def writeCursor(path: Path, flags: Flags): Resource[F, WriteCursor[F]]

    Returns a WriteCursor for the specified path.

  50. abstract def writeCursorFromFileHandle(file: FileHandle[F], append: Boolean): F[WriteCursor[F]]

    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.

  51. abstract def writeRotate(computePath: F[Path], limit: Long, flags: Flags): Pipe[F, Byte, Nothing]

    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.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. def copy(source: Path, target: Path): F[Unit]

    Copies the source to the target, failing if source does not exist or the target already exists.

    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)).

  7. def createDirectories(path: Path): F[Unit]

    Creates the specified directory and any non-existant parent directories.

  8. def createDirectory(path: Path): F[Unit]

    Creates the specified directory.

    Creates the specified directory. Fails if the parent path does not already exist.

  9. def createFile(path: Path): F[Unit]

    Creates the specified file.

    Creates the specified file. Fails if the parent path does not already exist.

  10. def createSymbolicLink(link: Path, target: Path): F[Unit]

    Creates a symbolic link which points to the supplied target.

  11. def createTempDirectory: F[Path]

    Creates a temporary directory.

    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.

  12. def createTempFile: F[Path]

    Creates a temporary file.

    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.

  13. def deleteRecursively(path: Path): F[Unit]

    Deletes the specified file or directory.

    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).

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def exists(path: Path): F[Boolean]

    Returns true if the specified path exists.

    Returns true if the specified path exists. Symbolic links are followed -- see the overload for more details on links.

  17. def getBasicFileAttributes(path: Path): F[BasicFileAttributes]

    Gets BasicFileAttributes for the supplied path.

    Gets BasicFileAttributes for the supplied path. Symbolic links are not followed.

  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. def getLastModifiedTime(path: Path): F[FiniteDuration]

    Gets the last modified time of the supplied path.

    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.

  20. def getPosixFileAttributes(path: Path): F[PosixFileAttributes]

    Gets the POSIX attributes for the supplied path.

    Gets the POSIX attributes for the supplied path. Symbolic links are not followed.

  21. def getPosixPermissions(path: Path): F[PosixPermissions]

    Gets the POSIX permissions of the supplied path.

    Gets the POSIX permissions of the supplied path. Symbolic links are followed.

  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. def isDirectory(path: Path): F[Boolean]

    Returns true if the supplied path exists and is a directory.

    Returns true if the supplied path exists and is a directory. Symbolic links are followed.

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def isRegularFile(path: Path): F[Boolean]

    Returns true if the supplied path is a regular file.

    Returns true if the supplied path is a regular file. Symbolic links are followed.

  26. def move(source: Path, target: Path): F[Unit]

    Moves the source to the target, failing if source does not exist or the target already exists.

    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)).

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  30. def readAll(path: Path): Stream[F, Byte]

    Reads all bytes from the file specified.

  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. def tempDirectory: Resource[F, Path]

    Creates a temporary directory and deletes it upon finalization of the returned resource.

  33. def tempFile: Resource[F, Path]

    Creates a temporary file and deletes it upon finalization of the returned resource.

  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. def walk(start: Path): Stream[F, Path]

    Creates a stream of paths contained in a given file tree.

    Creates a stream of paths contained in a given file tree. Depth is unlimited.

  39. def watch(path: Path): Stream[F, Event]

    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.

    Definition Classes
    FilesPlatform
  40. def writeAll(path: Path): Pipe[F, Byte, Nothing]

    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.

Deprecated Value Members

  1. def copy(source: java.nio.file.Path, target: java.nio.file.Path, flags: Seq[CopyOption] = Seq.empty): F[java.nio.file.Path]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  2. def createDirectories(path: java.nio.file.Path, flags: Seq[FileAttribute[_]] = Seq.empty): F[java.nio.file.Path]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  3. def createDirectory(path: java.nio.file.Path, flags: Seq[FileAttribute[_]] = Seq.empty): F[java.nio.file.Path]

    Creates a new directory at the given path.

    Creates a new directory at the given path.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  4. def delete(path: java.nio.file.Path): F[Unit]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  5. def deleteDirectoryRecursively(path: java.nio.file.Path, options: Set[FileVisitOption] = Set.empty): F[Unit]

    Recursively delete a directory

    Recursively delete a directory

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use deleteRecursively

  6. def deleteIfExists(path: java.nio.file.Path): F[Boolean]

    Like delete, but will not fail when the path doesn't exist.

    Like delete, but will not fail when the path doesn't exist.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  7. def directoryStream(path: java.nio.file.Path, glob: String): Stream[F, java.nio.file.Path]

    Creates a stream of Paths inside a directory which match the given glob.

    Creates a stream of Paths inside a directory which match the given glob.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use list(path, glob)

  8. def directoryStream(path: java.nio.file.Path, filter: (java.nio.file.Path) => Boolean): Stream[F, java.nio.file.Path]

    Creates a stream of Paths inside a directory, filtering the results by the given predicate.

    Creates a stream of Paths inside a directory, filtering the results by the given predicate.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use list(path).filter(p)

  9. def directoryStream(path: java.nio.file.Path): Stream[F, java.nio.file.Path]

    Creates a stream of Paths inside a directory.

    Creates a stream of Paths inside a directory.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use list(path)

  10. def exists(path: java.nio.file.Path, flags: Seq[LinkOption] = Seq.empty): F[Boolean]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  12. def isDirectory(path: java.nio.file.Path, linkOption: Seq[LinkOption] = Nil): F[Boolean]

    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.

    path

    the path to the file to test

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  13. def isFile(path: java.nio.file.Path, linkOption: Seq[LinkOption] = Nil): F[Boolean]

    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.

    path

    the path to the file

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use isRegularFile which uses fs2.io.file.Path

  14. def move(source: java.nio.file.Path, target: java.nio.file.Path, flags: Seq[CopyOption] = Seq.empty): F[java.nio.file.Path]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  15. def open(path: java.nio.file.Path, flags: Seq[OpenOption]): Resource[F, FileHandle[F]]

    Creates a FileHandle for the file at the supplied Path.

    Creates a FileHandle for the file at the supplied Path.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  16. def permissions(path: java.nio.file.Path, flags: Seq[LinkOption] = Seq.empty): F[Set[PosixFilePermission]]

    Get file permissions as set of PosixFilePermission.

    Get file permissions as set of PosixFilePermission.

    Note: this will only work for POSIX supporting file systems.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use getPosixPermissions

  17. def readAll(path: java.nio.file.Path, chunkSize: Int): Stream[F, Byte]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  18. def readCursor(path: java.nio.file.Path, flags: Seq[OpenOption] = Nil): Resource[F, ReadCursor[F]]

    Returns a ReadCursor for the specified path.

    Returns a ReadCursor for the specified path. The READ option is added to the supplied flags.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  19. def readCursor(path: java.nio.file.Path): Resource[F, ReadCursor[F]]

    Returns a ReadCursor for the specified path.

    Returns a ReadCursor for the specified path.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  20. def readRange(path: java.nio.file.Path, chunkSize: Int, start: Long, end: Long): Stream[F, Byte]

    Reads a range of data synchronously from the file at the specified java.nio.file.Path.

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  21. def setPermissions(path: java.nio.file.Path, permissions: Set[PosixFilePermission]): F[java.nio.file.Path]

    Set file permissions from set of PosixFilePermission.

    Set file permissions from set of PosixFilePermission.

    Note: this will only work for POSIX supporting file systems.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use setPosixPermissions

  22. def size(path: java.nio.file.Path): F[Long]

    Returns the size of a file (in bytes).

    Returns the size of a file (in bytes).

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  23. def tail(path: java.nio.file.Path, chunkSize: Int, offset: Long, pollDelay: FiniteDuration): Stream[F, Byte]

    Returns an infinite stream of data from the file at the specified path.

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  24. def tempDirectory(dir: Option[java.nio.file.Path] = None, prefix: String = "", attributes: Seq[FileAttribute[_]] = Seq.empty): Resource[F, java.nio.file.Path]

    Creates a Resource which can be used to create a temporary directory.

    Creates a Resource which can be used to create a temporary directory. The directory is created during resource allocation, and removed during its release.

    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

    an optional list of file attributes to set atomically when creating the directory

    returns

    a resource containing the path of the temporary directory

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  25. def tempFile(dir: Option[java.nio.file.Path] = None, prefix: String = "", suffix: String = ".tmp", attributes: Seq[FileAttribute[_]] = Seq.empty): Resource[F, java.nio.file.Path]

    Creates a Resource which can be used to create a temporary file.

    Creates a Resource which can be used to create a temporary file. The file is created during resource allocation, and removed during its release.

    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

    an optional list of file attributes to set atomically when creating the file

    returns

    a resource containing the path of the temporary file

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  26. def walk(start: java.nio.file.Path, maxDepth: Int, options: Seq[FileVisitOption] = Seq.empty): Stream[F, java.nio.file.Path]

    Creates a stream of JPaths contained in a given file tree down to a given depth.

    Creates a stream of JPaths contained in a given file tree down to a given depth.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  27. def walk(start: java.nio.file.Path, options: Seq[FileVisitOption]): Stream[F, java.nio.file.Path]

    Creates a stream of JPaths contained in a given file tree, respecting the supplied options.

    Creates a stream of JPaths contained in a given file tree, respecting the supplied options. Depth is unlimited.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  28. def walk(start: java.nio.file.Path): Stream[F, java.nio.file.Path]

    Creates a stream of JPaths contained in a given file tree.

    Creates a stream of JPaths contained in a given file tree. Depth is unlimited.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  29. def watch(path: java.nio.file.Path, types: Seq[EventType] = Nil, modifiers: Seq[Modifier] = Nil, pollTimeout: FiniteDuration = 1.second): Stream[F, Event]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  30. def watcher: Resource[F, io.Watcher[F]]

    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().

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use Watcher.default

  31. def writeAll(path: java.nio.file.Path, flags: Seq[StandardOpenOption] = List(StandardOpenOption.CREATE)): Pipe[F, Byte, Nothing]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  32. def writeCursor(path: java.nio.file.Path, flags: Seq[OpenOption] = List(StandardOpenOption.CREATE)): Resource[F, WriteCursor[F]]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

  33. def writeRotate(computePath: F[java.nio.file.Path], limit: Long, flags: Seq[StandardOpenOption] = List(StandardOpenOption.CREATE)): Pipe[F, Byte, Nothing]

    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.

    Definition Classes
    DeprecatedFilesApi
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use overload which uses fs2.io.file.Path

Inherited from FilesPlatform[F]

Inherited from DeprecatedFilesApi[F]

Inherited from AnyRef

Inherited from Any

Ungrouped