|
YAACC - UPNP Client and Server
|
The app's cache/incoming/ directory, where copies of provider files that cannot seek are kept for the time of a share.
More...

Static Public Member Functions | |
| static int | sweep (File dir) |
| Deletes the leftovers of an earlier run (the registry is in memory, so no copy survives a process). | |
| static long | totalBytes (File dir) |
| static long | remainingCopyBudget (File dir) |
How many bytes one more copy may have: the per-file cap, reduced so that all copies together stay within ShareLimits#INCOMING_DIR_MAX_BYTES. | |
| static File | createCopyFile (File dir, Consumer< byte[]> randomBytes) throws IOException |
| Creates a new, empty file with a random name in the directory (created if needed). | |
Static Public Attributes | |
| static final String | DIR_NAME = "incoming" |
| The directory name below the cache directory. | |
The app's cache/incoming/ directory, where copies of provider files that cannot seek are kept for the time of a share.
Plain Java (java.io/java.nio.file only), so it is tested on the JVM with a temporary folder.
The directory is private to the app, but it is still treated carefully: only entries that are regular files with exactly the shape of IncomingFileNames#randomName are ever deleted, symbolic links and directories are never followed, opened or deleted, and names never come from the provider.
|
static |
Creates a new, empty file with a random name in the directory (created if needed).
| IOException | if no file could be created |
Referenced by de.yaacc.share.SharedFileOpener.copyAndHold().


|
static |
How many bytes one more copy may have: the per-file cap, reduced so that all copies together stay within ShareLimits#INCOMING_DIR_MAX_BYTES.
Referenced by de.yaacc.share.SharedFileOpener.copyAndHold().


|
static |
Deletes the leftovers of an earlier run (the registry is in memory, so no copy survives a process).
Never throws.

|
static |
Referenced by de.yaacc.share.IncomingCache.remainingCopyBudget().
