RichFile

final class RichFile(val asFile: File) extends AnyVal with RichNioPath
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def /(component: String): File
def absolutePath: String
override def asPath: Path
Definition Classes
def asURL: URL

The wrapped file converted to a URL.

The wrapped file converted to a URL.

def base: String

The base of the name of this path. This is the part of the name before the last period, or the full name if there is no period.

The base of the name of this path. This is the part of the name before the last period, or the full name if there is no period.

def baseAndExt: (String, String)
def exists: Boolean

True if and only if the wrapped file exists.

True if and only if the wrapped file exists.

def ext: String

The extension part of the name of this path. This is the part of the name after the last period, or the empty string if there is no period.

The extension part of the name of this path. This is the part of the name after the last period, or the empty string if there is no period.

def hash: Array[Byte]
def hashString: String
def hashStringHalf: String
def isDirectory: Boolean

True if and only if the wrapped file is a directory.

True if and only if the wrapped file is a directory.

def lastModified: Long

The last modified time of the wrapped file.

The last modified time of the wrapped file.

def name: String

The last component of this path.

The last component of this path.

def newerThan(other: File): Boolean

True if and only if the wrapped file asFile exists and the file 'other' does not exist or was modified before the asFile.

True if and only if the wrapped file asFile exists and the file 'other' does not exist or was modified before the asFile.

def olderThan(other: File): Boolean

True if and only if the wrapped file asFile does not exist or the file other exists and was modified after asFile.

True if and only if the wrapped file asFile does not exist or the file other exists and was modified after asFile.

def relativeTo(base: File): Option[File]
def relativize(sub: File): Option[File]
def withLinkOptions(linkOption: LinkOption*): LinkOptionPath

Inherited methods

def aclFileAttributeView: AclFileAttributeView
Inherited from:
RichNioPath
def addPermission(permission: PosixFilePermission): Unit

Adds permission to this file. This operation requires underlying filesystem to support IO.isPosix.

Adds permission to this file. This operation requires underlying filesystem to support IO.isPosix.

Value parameters:
permission

the permission to add

Inherited from:
RichNioPath
def attributes: BasicFileAttributes
Inherited from:
RichNioPath
def dosAttributes: DosFileAttributes
Inherited from:
RichNioPath
def group: GroupPrincipal

Returns the group owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Returns the group owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Inherited from:
RichNioPath
def groupName: String

Returns the group owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Returns the group owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Inherited from:
RichNioPath
def isGroupExecutable: Boolean

Tests if this file has the group+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the group+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isGroupReadable: Boolean

Tests if this file has the group+read permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the group+read permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isGroupWritable: Boolean

Tests if this file has the group+write permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the group+write permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOthersExecutable: Boolean

Tests if this file has the others+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the others+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOthersReadable: Boolean

Tests if this file has the others+read permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the others+read permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOthersWritable: Boolean

Tests if this file has the others+write permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the others+write permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOwnerExecutable: Boolean

Tests if this file has the owner+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the owner+execute permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOwnerReadable: Boolean

Tests if this file has the owner+read permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the owner+read permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def isOwnerWritable: Boolean

Tests if this file has the owner+write permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the owner+write permission. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def owner: UserPrincipal

Returns the owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Returns the owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Inherited from:
RichNioPath
def ownerName: String

Returns the owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Returns the owner of a file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Inherited from:
RichNioPath
def permissions: Set[PosixFilePermission]

Returns this file's POSIX permissions. This operation requires underlying filesystem to support IO.isPosix.

Returns this file's POSIX permissions. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath

Returns this file's POSIX permissions. This operation requires underlying filesystem to support IO.isPosix.

Returns this file's POSIX permissions. This operation requires underlying filesystem to support IO.isPosix.

Inherited from:
RichNioPath
def posixAttributes: PosixFileAttributes
Inherited from:
RichNioPath
def removePermission(permission: PosixFilePermission): Unit

Removes permission from this file. This operation requires underlying filesystem to support IO.isPosix.

Removes permission from this file. This operation requires underlying filesystem to support IO.isPosix.

Value parameters:
permission

the permission to remove

Inherited from:
RichNioPath
def setGroup(group: String): Unit

Updates the group owner of the file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Updates the group owner of the file. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Value parameters:
group

the new group owner

Inherited from:
RichNioPath
def setOwner(owner: String): Unit

Updates the file owner. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Updates the file owner. This operation requires underlying filesystem to support IO.hasFileOwnerAttributeView.

Value parameters:
owner

the new group owner

Inherited from:
RichNioPath
def setPermissions(permissions: Set[PosixFilePermission]): Unit

Updates permission of this file. This operation requires underlying filesystem to support IO.isPosix.

Updates permission of this file. This operation requires underlying filesystem to support IO.isPosix.

Value parameters:
permissions

the permissions to add

Inherited from:
RichNioPath
def testPermission(permission: PosixFilePermission): Boolean

Tests if this file has the given permission. This operation requires underlying filesystem to support IO.isPosix.

Tests if this file has the given permission. This operation requires underlying filesystem to support IO.isPosix.

Value parameters:
permission

the permission to remove

Inherited from:
RichNioPath

Concrete fields

val asFile: File