FileMgr

object FileMgr

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Copy the folder to the specified location, this method will not delete the original folder.

Link copied to clipboard

Copy the file to the specified location, this method will not delete the original file.

Link copied to clipboard

Delete directory.

Link copied to clipboard
Link copied to clipboard
fun getAssetsFile(fileName: String, dir: File = appInternalFilesDir()): File

Get assets cache file.

Link copied to clipboard

Get encrypted file.

Link copied to clipboard

Get the extension name of the file.

Link copied to clipboard
@RequiresApi(value = 24)
fun getFileUriAboveApi24(file: File, authority: String): Uri

Get the uri by file.

Link copied to clipboard

Get the uri by file.

Link copied to clipboard
fun getMimeType(file: File, fallback: String): String

Get the mimetype of the file, fallback otherwise. For more information, please refer to How to determine MIME type of file in android?

Link copied to clipboard

If the dir exists, get it directly, otherwise Create the directory named by this abstract pathname, including any necessary but nonexistent parent directories.

Link copied to clipboard

If the file exists, get it directly, otherwise try to create it and get it.

Link copied to clipboard

Get file path

Link copied to clipboard

Checks if a volume containing external storage is available to at least read.

Link copied to clipboard

Checks if a volume containing external storage is available for read and write.

Link copied to clipboard

Make directory.

Link copied to clipboard

Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories.

Link copied to clipboard
fun moveDir(dir: File, destination: String): ResultCompat<String>

Move the folder to the specified location.

Link copied to clipboard
fun moveFile(file: File, destination: String): ResultCompat<String>

Move the file to the specified location.

Link copied to clipboard

Renaming file or directory.

Link copied to clipboard