java.lang.Object | |
↳ | de.robv.android.xposed.services.BaseService |
General definition of a file access service provided by the Xposed framework.
References to a concrete subclass should generally be retrieved from SELinuxHelper
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | F_OK |
Flag for checkFileAccess(String, int) : File/directory exists.
|
|||||||||
int | R_OK |
Flag for checkFileAccess(String, int) : Read access.
|
|||||||||
int | W_OK |
Flag for checkFileAccess(String, int) : Write access.
|
|||||||||
int | X_OK |
Flag for checkFileAccess(String, int) : Executable access.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Check whether a file is accessible.
| |||||||||||
Check whether a file exists.
| |||||||||||
Get a stream to the file content, but only if it has changed since the last time.
| |||||||||||
Get a stream to the file content.
| |||||||||||
Determine the size time of a file.
| |||||||||||
Determine the size time of a file.
| |||||||||||
Checks whether the services accesses files directly (instead of using IPC).
| |||||||||||
Read a file into memory.
| |||||||||||
Read a file into memory, but only if it has changed since the last time.
| |||||||||||
Read a file into memory, optionally only if it has changed since the last time.
| |||||||||||
Determine the size and modification time of a file.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Flag for checkFileAccess(String, int)
: File/directory exists.
Flag for checkFileAccess(String, int)
: Read access.
Flag for checkFileAccess(String, int)
: Write access.
Flag for checkFileAccess(String, int)
: Executable access.
Check whether a file is accessible. SELinux might enforce stricter checks.
filename | The absolute path of the file to check. |
---|---|
mode | The mode for POSIX's access() function. |
access()
function.
Check whether a file exists.
filename | The absolute path of the file to check. |
---|
access()
function.
Get a stream to the file content, but only if it has changed since the last time. Depending on the service, it may or may not be read completely into memory.
filename | The absolute path of the file to read. |
---|---|
previousSize | Optional: File size of last read. |
previousTime | Optional: File modification time of last read. |
FileResult
object holding the result.
The FileResult.stream
field might be null
if the file
is unmodified (previousSize
and previousTime
are still valid).
IOException | In case an error occurred while reading the file. |
---|
Get a stream to the file content. Depending on the service, it may or may not be read completely into memory.
filename | The absolute path of the file to read. |
---|
InputStream
to the file content.IOException | In case an error occurred while reading the file. |
---|
Determine the size time of a file.
filename | The absolute path of the file to check. |
---|
IOException | In case an error occurred while retrieving the information. |
---|
Determine the size time of a file.
filename | The absolute path of the file to check. |
---|
IOException | In case an error occurred while retrieving the information. |
---|
Checks whether the services accesses files directly (instead of using IPC).
true
in case direct access is possible.
Read a file into memory.
filename | The absolute path of the file to read. |
---|
byte
array with the file content.IOException | In case an error occurred while reading the file. |
---|
Read a file into memory, but only if it has changed since the last time.
filename | The absolute path of the file to read. |
---|---|
previousSize | File size of last read. |
previousTime | File modification time of last read. |
FileResult
object holding the result.
The FileResult.content
field might be null
if the file
is unmodified (previousSize
and previousTime
are still valid).
IOException | In case an error occurred while reading the file. |
---|
Read a file into memory, optionally only if it has changed since the last time.
filename | The absolute path of the file to read. |
---|---|
offset | Number of bytes to skip at the beginning of the file. |
length | Number of bytes to read (0 means read to end of file). |
previousSize | Optional: File size of last read. |
previousTime | Optional: File modification time of last read. |
FileResult
object holding the result.
The FileResult.content
field might be null
if the file
is unmodified (previousSize
and previousTime
are still valid).
IOException | In case an error occurred while reading the file. |
---|
Determine the size and modification time of a file.
filename | The absolute path of the file to check. |
---|
FileResult
object holding the result.IOException | In case an error occurred while retrieving the information. |
---|