Oolite 1.91.0.7604-240417-a536cbe
Loading...
Searching...
No Matches
JAPersistentFileReference.h
Go to the documentation of this file.
1/*
2
3JAPersistentFileReference.h
4
5Store file references in a property list format. For file URLs, uses bookmark
6data (when available) and aliases to track files even if they're moved or
7renamed.
8
9
10Copyright (C) 2010-2013 Jens Ayton
11
12Permission is hereby granted, free of charge, to any person obtaining a copy
13of this software and associated documentation files (the "Software"), to deal
14in the Software without restriction, including without limitation the rights
15to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16copies of the Software, and to permit persons to whom the Software is
17furnished to do so, subject to the following conditions:
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28SOFTWARE.
29
30*/
31
32#import <Foundation/Foundation.h>
33
34
35enum
36{
37 kJAPersistentFileReferenceWithoutUI = 0x00000001UL, // Avoid user interaction.
38 kJAPersistentFileReferenceWithoutMounting = 0x00000002UL, // Avoid mounting volumes.
39 kJAPersistentFileReferenceReturnReferenceURL = 0x00000004UL // Return a file reference URL if possible.
40};
41
43
44
45NSDictionary *JAPersistentFileReferenceFromURL(NSURL *url);
46NSURL *JAURLFromPersistentFileReference(NSDictionary *fileRef, JAPersistentFileReferenceResolveFlags flags, BOOL *isStale);
47
48NSDictionary *JAPersistentFileReferenceFromPath(NSString *path);
49NSString *JAPathFromPersistentFileReference(NSDictionary *fileRef, JAPersistentFileReferenceResolveFlags flags, BOOL *isStale);
@ kJAPersistentFileReferenceReturnReferenceURL
@ kJAPersistentFileReferenceWithoutUI
@ kJAPersistentFileReferenceWithoutMounting
NSString * JAPathFromPersistentFileReference(NSDictionary *fileRef, JAPersistentFileReferenceResolveFlags flags, BOOL *isStale)
NSURL * JAURLFromPersistentFileReference(NSDictionary *fileRef, JAPersistentFileReferenceResolveFlags flags, BOOL *isStale)
NSDictionary * JAPersistentFileReferenceFromURL(NSURL *url)
NSDictionary * JAPersistentFileReferenceFromPath(NSString *path)
uint32_t JAPersistentFileReferenceResolveFlags