public enum FileAccess

  1. Object
  2. Enum<FileAccess>
  3. FileAccess

ImplementsComparable<FileAccess>

How a sandboxed macOS application may reach files the user chooses.

com.apple.security.files.user-selected.read-write and its read-only sibling are two different entitlements, and neither is a yes/no: an application can ask for write access, for read access, or for nothing at all. A boolean cannot say which of the two it wants, which is why this is an enum – expressing it as one would have made ON mean “some access, builder’s choice” and OFF silently drop the read-write access that is the default.

Enum constants

DEFAULTSay nothing, and let the build server apply its own default.
READ_WRITERead and write the files the user opened.
READ_ONLYRead the files the user opened, without writing them back.
NONENo user-selected file access at all.

Methods

public static FileAccess[] values()
public static FileAccess valueOf(String name)

Inherited methods

Enum constant details

DEFAULT

DEFAULT
Say nothing, and let the build server apply its own default.

READ_WRITE

READ_WRITE
Read and write the files the user opened. The build’s default.

READ_ONLY

READ_ONLY
Read the files the user opened, without writing them back.

NONE

NONE
No user-selected file access at all.

Method details

values

public static FileAccess[] values()

valueOf

public static FileAccess valueOf(String name)