ParcelFileDescriptor$Mode enum

Desired access mode of the file to be opened.

The constants are declared in android.os.ParcelFileDescriptor of AOSP, and are translated into the POSIX flags of android.system.OsConstants when the file is actually opened.

Inheritance
Available extensions

Values

worldReadable → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: if create has been supplied and this file doesn't already exist, then create the file with permissions such that any application can read it.

Creating world-readable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanism for interactions such as ContentProvider, BroadcastReceiver, and android.app.Service. There are no guarantees that this access mode will remain on a file, such as when it goes through a backup and restore.

worldWriteable → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: if create has been supplied and this file doesn't already exist, then create the file with permissions such that any application can write it.

Creating world-writable files is very dangerous, and likely to cause security holes in applications. It is strongly discouraged; instead, applications should use more formal mechanism for interactions such as ContentProvider, BroadcastReceiver, and android.app.Service. There are no guarantees that this access mode will remain on a file, such as when it goes through a backup and restore.

readOnly → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: open the file with read-only access, equivalent to OsConstants.O_RDONLY.

writeOnly → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: open the file with write-only access, equivalent to OsConstants.O_WRONLY.

readWrite → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: open the file with read and write access, equivalent to OsConstants.O_RDWR.

create → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: create the file if it doesn't already exist, equivalent to OsConstants.O_CREAT.

truncate → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: erase contents of file when opening, equivalent to OsConstants.O_TRUNC.

append → const ParcelFileDescriptor$Mode

For use with ParcelFileDescriptor.open: append to end of file while writing, equivalent to OsConstants.O_APPEND.

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<ParcelFileDescriptor$Mode>
A constant List of the values in this enum, in order of their declaration.