File Utils
Functions
Link copied to clipboard
Retrieves the byte array of the specified file, which must start with content.
Link copied to clipboard
Convert image to file
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Reads a file in bytes, commonly used for reading binary files such as images, audio, video, etc.
Link copied to clipboard
Retrieves the cache storage path, such as
/sdcard/Android/data/<package
name>/cache/<dir>
Link copied to clipboard
Retrieves the cache storage path, such as
/sdcard/Android/data/<package
name>/cache
Retrieves the cache storage path, such as
/sdcard/Android/data/<package
name>/cache/<dir>
Link copied to clipboard
// For versions below 9.
Link copied to clipboard
Retrieves the file name, size, and type from the file
Link copied to clipboard
Retrieves the file name, size, and type from the URI.
Link copied to clipboard
Creates an input stream pointing to the file, reading its contents into memory.
Link copied to clipboard
Retrieves the key for media messages, used for handling messages such as images, videos, and GIFs.
Link copied to clipboard
Gets the file length.
Link copied to clipboard
Retrieves the file name based on the file path
Link copied to clipboard
Get the size of the specified file
Link copied to clipboard
Link copied to clipboard
Retrieves the file type from the input stream
Link copied to clipboard
Get the app cache storage path
data/data/<package name>/cache/<dir>
Link copied to clipboard
Link copied to clipboard
Get the storage path of media files
Get the storage path for media files
Link copied to clipboard
Get file data
Link copied to clipboard
Retrieves the MD5 key for file resumption, used to identify the file being downloaded.
Retrieves the temporary filename for resumable file download, used to identify the file being downloaded.
Link copied to clipboard
Get the temporary file storage path for resumable upload
Get the temporary file storage path for resumable uploads
Link copied to clipboard
Link copied to clipboard
Checks if the file exists.
Link copied to clipboard
Checks if the file URI scheme starts with file or content.
Link copied to clipboard
Reads the rotation angle of an image
Link copied to clipboard
Delete File
Link copied to clipboard
Cleans the file name to prevent path traversal attacks
Link copied to clipboard
Checks whether the file URI scheme starts with content.
Link copied to clipboard
Checks if the file Uri scheme starts with file and if the file Uri length exceeds 7