2 // PBNSURLPathUserDefaultsTransfomer.m
5 // Created by Christian Jacobsen on 28/09/2008.
6 // Copyright 2008 __MyCompanyName__. All rights reserved.
9 #import "PBNSURLPathUserDefaultsTransfomer.h"
12 This ValueTransformer is used to store NSURLs in the user defaults system
13 as strings, without a host part. It is assumed that the path is an absolute
14 path in the local filesystem.
17 @implementation PBNSURLPathUserDefaultsTransfomer
19 + (Class)transformedValueClass {
23 + (BOOL)allowsReverseTransformation {
27 - (id)transformedValue:(id)value {
33 return [NSURL URLWithString:value
34 relativeToURL:[NSURL URLWithString:@"file://localhost/"]];
37 - (id)reverseTransformedValue:(id)value {