1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-01-31 03:12:44 +00:00

add a description method to FileListNode

This commit is contained in:
Mitchell Livingston 2011-05-21 18:29:35 +00:00
parent 807cc6fa16
commit 3325fbb602
2 changed files with 10 additions and 0 deletions

View file

@ -42,6 +42,8 @@
- (void) insertChild: (FileListNode *) child;
- (void) insertIndex: (NSUInteger) index withSize: (uint64_t) size;
- (NSString *) description;
- (BOOL) isFolder;
- (NSString *) name;
- (NSString *) path;

View file

@ -88,6 +88,14 @@
[super dealloc];
}
- (NSString *) description
{
if (!fIsFolder)
return [NSString stringWithFormat: @"%@ (%d)", fName, [fIndexes firstIndex]];
else
return [NSString stringWithFormat: @"%@ (folder: %@)", fName, fIndexes];
}
- (BOOL) isFolder
{
return fIsFolder;