2022-01-20 12:27:56 -06:00
|
|
|
// This file Copyright © 2007-2022 Transmission authors and contributors.
|
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2007-09-16 01:02:06 +00:00
|
|
|
|
|
|
|
#import "ExpandedPathToPathTransformer.h"
|
|
|
|
|
|
|
|
@implementation ExpandedPathToPathTransformer
|
|
|
|
|
2021-08-15 12:41:48 +03:00
|
|
|
+ (Class)transformedValueClass
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
|
|
|
return [NSString class];
|
|
|
|
}
|
|
|
|
|
2021-08-15 12:41:48 +03:00
|
|
|
+ (BOOL)allowsReverseTransformation
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2021-08-15 12:41:48 +03:00
|
|
|
- (id)transformedValue:(id)value
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
2021-08-15 12:41:48 +03:00
|
|
|
return value == nil ? nil : [NSFileManager.defaultManager displayNameAtPath:value];
|
2007-09-16 01:02:06 +00:00
|
|
|
}
|
|
|
|
|
2021-08-07 14:27:56 +07:00
|
|
|
@end
|