File Utils
Functions
Link copied to clipboard
Gets the byte array of the specified file.
Link copied to clipboard
Converts a bitmap to a file.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Reads a file as bytes, commonly used for binary files such as images, audio, and video.
Link copied to clipboard
Gets the cache storage path, e.g.
Link copied to clipboard
Gets the cache storage path, e.g.
Link copied to clipboard
On versions below 9.
Link copied to clipboard
Gets file name, size, and type from a File object.
Link copied to clipboard
Gets file name, size, and type from a URI.
Link copied to clipboard
Creates an input stream for reading the specified file into memory.
Link copied to clipboard
Gets the key for a media message, used for image, video, GIF message handlers.
Link copied to clipboard
Gets the file length.
Link copied to clipboard
Gets the file name from a file path.
Link copied to clipboard
Gets the size of the specified file.
Link copied to clipboard
Link copied to clipboard
Detects the file type from an input stream.
Link copied to clipboard
Gets the app internal cache path
data/data/<package name>/cache/<dir>Link copied to clipboard
Link copied to clipboard
Gets the media file storage directory.
Link copied to clipboard
Reads file content as a string.
Link copied to clipboard
Gets the MD5 key for resumable file download, used to identify the file being downloaded.
Gets the temporary file name for resumable download, used to identify the file being downloaded.
Link copied to clipboard
Gets the temporary file storage path for resumable downloads.
Link copied to clipboard
Link copied to clipboard
Checks whether a file exists.
Link copied to clipboard
Checks whether the file Uri scheme starts with "file" or "content".
Link copied to clipboard
Reads the rotation degree of an image.
Link copied to clipboard
Deletes a file.
Link copied to clipboard
Sanitizes 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 whether the file Uri scheme starts with "file" and its length exceeds 7.