final class RichFile extends AnyVal with RichNioPath
- Alphabetic
- By Inheritance
- RichFile
- RichNioPath
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RichFile(asFile: File)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
- def /(component: String): File
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
- def absolutePath: String
-
def
aclFileAttributeView: AclFileAttributeView
- Definition Classes
- RichNioPath
-
def
addPermission(permission: PosixFilePermission): Unit
Adds permission to this file.
Adds permission to this file. This operation requires underlying filesystem to support
IO.isPosix
.- permission
the permission to add
- Definition Classes
- RichNioPath
- val asFile: File
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asPath: java.nio.file.Path
- Definition Classes
- RichFile → RichNioPath
-
def
asURL: URL
The wrapped file converted to a
URL
. -
def
attributes: BasicFileAttributes
- Definition Classes
- RichNioPath
-
def
base: String
The base of the name of this path.
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
dosAttributes: DosFileAttributes
- Definition Classes
- RichNioPath
-
def
exists: Boolean
True if and only if the wrapped file exists.
-
def
ext: String
The extension part of the name of this path.
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
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
group: GroupPrincipal
Returns the group owner of a file.
Returns the group owner of a file. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- Definition Classes
- RichNioPath
-
def
groupName: String
Returns the group owner of a file.
Returns the group owner of a file. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- Definition Classes
- RichNioPath
- def hash: Array[Byte]
- def hashString: String
- def hashStringHalf: String
-
def
isDirectory: Boolean
True if and only if the wrapped file is a directory.
-
def
isGroupExecutable: Boolean
Tests if this file has the group+execute permission.
Tests if this file has the group+execute permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isGroupReadable: Boolean
Tests if this file has the group+read permission.
Tests if this file has the group+read permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isGroupWritable: Boolean
Tests if this file has the group+write permission.
Tests if this file has the group+write permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isOthersExecutable: Boolean
Tests if this file has the others+execute permission.
Tests if this file has the others+execute permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isOthersReadable: Boolean
Tests if this file has the others+read permission.
Tests if this file has the others+read permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isOthersWritable: Boolean
Tests if this file has the others+write permission.
Tests if this file has the others+write permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isOwnerExecutable: Boolean
Tests if this file has the owner+execute permission.
Tests if this file has the owner+execute permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isOwnerReadable: Boolean
Tests if this file has the owner+read permission.
Tests if this file has the owner+read permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
isOwnerWritable: Boolean
Tests if this file has the owner+write permission.
Tests if this file has the owner+write permission. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
lastModified: Long
The last modified time of the wrapped file.
-
def
name: String
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 theasFile
. -
def
olderThan(other: File): Boolean
True if and only if the wrapped file
asFile
does not exist or the fileother
exists and was modified afterasFile
. -
def
owner: UserPrincipal
Returns the owner of a file.
Returns the owner of a file. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- Definition Classes
- RichNioPath
-
def
ownerName: String
Returns the owner of a file.
Returns the owner of a file. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- Definition Classes
- RichNioPath
-
def
permissions: Set[PosixFilePermission]
Returns this file's POSIX permissions.
Returns this file's POSIX permissions. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
permissionsAsString: String
Returns this file's POSIX permissions.
Returns this file's POSIX permissions. This operation requires underlying filesystem to support
IO.isPosix
.- Definition Classes
- RichNioPath
-
def
posixAttributes: PosixFileAttributes
- Definition Classes
- RichNioPath
- def relativeTo(base: File): Option[File]
- def relativize(sub: File): Option[File]
-
def
removePermission(permission: PosixFilePermission): Unit
Removes permission from this file.
Removes permission from this file. This operation requires underlying filesystem to support
IO.isPosix
.- permission
the permission to remove
- Definition Classes
- RichNioPath
-
def
setGroup(group: String): Unit
Updates the group owner of the file.
Updates the group owner of the file. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- group
the new group owner
- Definition Classes
- RichNioPath
-
def
setOwner(owner: String): Unit
Updates the file owner.
Updates the file owner. This operation requires underlying filesystem to support
IO.hasFileOwnerAttributeView
.- owner
the new group owner
- Definition Classes
- RichNioPath
-
def
setPermissions(permissions: Set[PosixFilePermission]): Unit
Updates permission of this file.
Updates permission of this file. This operation requires underlying filesystem to support
IO.isPosix
.- permissions
the permissions to add
- Definition Classes
- RichNioPath
-
def
testPermission(permission: PosixFilePermission): Boolean
Tests if this file has the given permission.
Tests if this file has the given permission. This operation requires underlying filesystem to support
IO.isPosix
.- permission
the permission to remove
- Definition Classes
- RichNioPath
-
def
toString(): String
- Definition Classes
- Any
- def withLinkOptions(linkOption: LinkOption*): LinkOptionPath