Companion

object Companion

Functions

Link copied to clipboard

Check the given file for its type, whether it is a regular file, a Windows link or a UNIX symlink.

Link copied to clipboard
fun deleteMultiple(vararg files: File)

Delete multiple files quietly.

Link copied to clipboard
fun isLink(file: File): Boolean
fun isLink(file: String): Boolean

Check if the given file is a UNIX symlink or Windows lnk.

Link copied to clipboard
fun isReadPermissionSet(fileOrDirectory: File): Boolean
fun isReadPermissionSet(fileOrDirectory: Path): Boolean
fun isReadPermissionSet(fileOrDirectory: String): Boolean

Check the given file or directory for read-permission.

Link copied to clipboard
fun isReadWritePermissionSet(fileOrDirectory: File): Boolean
fun isReadWritePermissionSet(fileOrDirectory: Path): Boolean
fun isReadWritePermissionSet(fileOrDirectory: String): Boolean

Check the given file or directory for read- and write-permission.

Link copied to clipboard
fun isWritePermissionSet(fileOrDirectory: File): Boolean
fun isWritePermissionSet(fileOrDirectory: Path): Boolean
fun isWritePermissionSet(fileOrDirectory: String): Boolean

Check the given file or directory for write-permission.

Link copied to clipboard
fun openFile(fileToOpen: File)
fun openFile(fileToOpen: String)

Open the specified file in an editor.

Link copied to clipboard
fun openFolder(folder: File)
fun openFolder(folder: String)

Open the specified folder in the file explorer.

Link copied to clipboard
fun replaceFile(sourceFile: File, destinationFile: File): Boolean

Move a file from source to destination, and replace the destination file if it exists.

Link copied to clipboard
fun resolveLink(link: File): String

Resolve a given link/symlink to its source.

Link copied to clipboard
fun unzipArchive(zipFile: String, destinationDirectory: String)

Unzips the downloaded modpack ZIP-archive to the specified directory.