2022-06-20 10:35:29 +00:00
|
|
|
//
|
|
|
|
// SandboxBroker.h
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Christopher Snowhill on 6/20/22.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@interface SandboxBroker : NSObject {
|
|
|
|
NSMutableArray *storage;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ (SandboxBroker *)sharedSandboxBroker;
|
|
|
|
|
2022-06-21 09:45:45 +00:00
|
|
|
+ (NSURL *)urlWithoutFragment:(NSURL *)url;
|
|
|
|
+ (BOOL)isPath:(NSURL *)path aSubdirectoryOf:(NSURL *)directory;
|
|
|
|
|
2022-06-20 10:35:29 +00:00
|
|
|
- (id)init;
|
|
|
|
- (void)shutdown;
|
|
|
|
|
2022-06-29 06:13:42 +00:00
|
|
|
- (void)addFolderIfMissing:(NSURL *)folderUrl;
|
2022-06-29 18:56:50 +00:00
|
|
|
- (void)addFileIfMissing:(NSURL *)fileUrl;
|
2022-06-29 06:13:42 +00:00
|
|
|
|
2022-07-04 05:37:11 +00:00
|
|
|
- (void)requestFolderForFile:(NSURL *)fileUrl;
|
|
|
|
|
2022-06-21 05:10:43 +00:00
|
|
|
- (const void *)beginFolderAccess:(NSURL *)fileUrl;
|
|
|
|
- (void)endFolderAccess:(const void *)handle;
|
2022-06-20 10:35:29 +00:00
|
|
|
|
2022-06-24 07:29:50 +00:00
|
|
|
- (BOOL)areAllPathsSafe:(NSArray *)urls;
|
|
|
|
|
2022-06-20 10:35:29 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|