Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions backends/apple/coreml/runtime/delegate/ETCoreMLAssetManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,17 @@ NS_ASSUME_NONNULL_BEGIN
- (NSUInteger)compact:(NSUInteger)sizeInBytes error:(NSError* __autoreleasing*)error;


/// Executes a block with a unique temporary directory.
///
/// A new temporary subdirectory URL is created inside the receiver’s designated
/// base directory. The directory is passed to the block, which can use it to
/// perform temporary file operations. After the block finishes executing,
/// the directory and its contents are removed.
///
/// @param block A block to execute. The block receives a unique URL.
- (void)withTemporaryDirectory:(void (^)(NSURL* directoryURL))block;


/// Purges the assets storage. The assets are moved to the trash directory and are asynchronously
/// deleted.
///
Expand All @@ -117,6 +128,12 @@ NS_ASSUME_NONNULL_BEGIN
/// contents are deleted asynchronously.
@property (copy, readonly, nonatomic) NSURL* trashDirectoryURL;


/// The staging directory URL, used to hold assets that are being prepared or processed
/// before they are moved into their final location. The contents of this directory
/// are temporary and may be cleared when no longer needed.
@property (copy, readonly, nonatomic) NSURL* stagingDirectoryURL;

/// The file manager.
@property (strong, readonly, nonatomic) NSFileManager* fileManager;

Expand Down
Loading
Loading