PccTarget
class PccTarget : OperationTarget
| kotlin.Any | ||
| ↳ | android.os.storage.operations.targets.OperationTarget | |
| ↳ | android.os.storage.operations.targets.PccTarget | |
A target representing the calling application's Private Compute Core (PCC) data directory.
Files directed to this target will be securely stored within the PCC component of the application. The optional path prefix can be used to organize files into subdirectories within the PCC storage area.
Example Usage:
<code>// Create a target that places files in a "processed_results" subdirectory within PCC PccTarget target = new PccTarget("processed_results/daily_logs"); // If a file named "report.dat" is sent to this target, it will be stored at: // [PCC_ROOT]/processed_results/daily_logs/report.dat </code>
Prefix Requirements:
- Must be relative: Absolute paths are rejected to prevent escaping the PCC root directory.
- No Path Traversal: The prefix cannot contain ".." or "." segments that resolve to parent or current directories.
- No Control Characters: Invisible or control characters (e.g., null, newline, surrogates) are prohibited for security.
Summary
| Public constructors | |
|---|---|
|
Creates a new PCC target with no path prefix. |
|
|
Creates a new PCC target with the specified path prefix. |
|
| Public methods | |
|---|---|
| String |
toString()Returns a string representation of this target for debugging. |
Public constructors
PccTarget
PccTarget(pathPrefix: String)
Creates a new PCC target with the specified path prefix.
| Parameters | |
|---|---|
pathPrefix |
String: The prefix to be added to the destination path of files. This value cannot be null. |
Public methods
toString
fun toString(): String
Returns a string representation of this target for debugging.
| Return | |
|---|---|
String |
A string containing the target type and prefix. This value cannot be null. |