2023-11-01 21:11:11 +00:00
|
|
|
// This file Copyright © Transmission authors and contributors.
|
2022-01-20 18:27:56 +00:00
|
|
|
// 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 09:41:48 +00:00
|
|
|
+ (Class)transformedValueClass
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
|
|
|
return [NSString class];
|
|
|
|
}
|
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
+ (BOOL)allowsReverseTransformation
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
}
|
|
|
|
|
2021-08-15 09:41:48 +00:00
|
|
|
- (id)transformedValue:(id)value
|
2007-09-16 01:02:06 +00:00
|
|
|
{
|
2021-08-15 09:41:48 +00:00
|
|
|
return value == nil ? nil : [NSFileManager.defaultManager displayNameAtPath:value];
|
2007-09-16 01:02:06 +00:00
|
|
|
}
|
|
|
|
|
2021-08-07 07:27:56 +00:00
|
|
|
@end
|