2022-06-20 06:35:29 -04: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 05:45:45 -04:00
|
|
|
+ (NSURL *)urlWithoutFragment:(NSURL *)url;
|
|
|
|
+ (BOOL)isPath:(NSURL *)path aSubdirectoryOf:(NSURL *)directory;
|
|
|
|
|
2022-07-25 02:14:52 -04:00
|
|
|
+ (void)cleanupFolderAccess;
|
|
|
|
|
2022-06-20 06:35:29 -04:00
|
|
|
- (id)init;
|
|
|
|
- (void)shutdown;
|
|
|
|
|
2022-06-29 02:13:42 -04:00
|
|
|
- (void)addFolderIfMissing:(NSURL *)folderUrl;
|
2022-06-29 14:56:50 -04:00
|
|
|
- (void)addFileIfMissing:(NSURL *)fileUrl;
|
2022-06-29 02:13:42 -04:00
|
|
|
|
2022-07-04 01:37:11 -04:00
|
|
|
- (void)requestFolderForFile:(NSURL *)fileUrl;
|
|
|
|
|
2022-06-21 01:10:43 -04:00
|
|
|
- (const void *)beginFolderAccess:(NSURL *)fileUrl;
|
|
|
|
- (void)endFolderAccess:(const void *)handle;
|
2022-06-20 06:35:29 -04:00
|
|
|
|
2022-06-24 03:29:50 -04:00
|
|
|
- (BOOL)areAllPathsSafe:(NSArray *)urls;
|
|
|
|
|
2022-06-20 06:35:29 -04:00
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|