FROM : Lachlan Cotter
DATE : Mon Feb 04 11:04:25 2008
Hi Cocoabuilders,
I know there have been similar threads on here before, but they don't
address my particular issue.
I'm using NSFileManager methods to move files into the trash. As has
been mentioned by others, this doesn't update the trash icon in the doc.
I know I could use the NSWorkspace method performFileOperation… but
the catch is I want to be able to undo the move, which means I would
need to know the path to which the file was moved. However
NSWorkspace may rename the file to prevent collisions. If this is the
case, I wont have any way to find the new path to the file (other
than guessing).
There are probably tricks that could be used to get this to work, but
I wonder if there isn't a simple notification that can be raised to
cause the trash icon to update?
In any case, I would also need to update it when taking files out of
the trash, in which case NSWorkspace is no help.
Who manages this icon? Is it the Finder? or the Doc? Is there an API
that can help here?
Thanks for your help.
Cheers,
Lach
DATE : Mon Feb 04 11:04:25 2008
Hi Cocoabuilders,
I know there have been similar threads on here before, but they don't
address my particular issue.
I'm using NSFileManager methods to move files into the trash. As has
been mentioned by others, this doesn't update the trash icon in the doc.
I know I could use the NSWorkspace method performFileOperation… but
the catch is I want to be able to undo the move, which means I would
need to know the path to which the file was moved. However
NSWorkspace may rename the file to prevent collisions. If this is the
case, I wont have any way to find the new path to the file (other
than guessing).
There are probably tricks that could be used to get this to work, but
I wonder if there isn't a simple notification that can be raised to
cause the trash icon to update?
In any case, I would also need to update it when taking files out of
the trash, in which case NSWorkspace is no help.
Who manages this icon? Is it the Finder? or the Doc? Is there an API
that can help here?
Thanks for your help.
Cheers,
Lach
| Related mails | Author | Date |
|---|---|---|
| Lachlan Cotter | Feb 4, 11:04 | |
| Mike Abdullah | Feb 4, 11:57 | |
| Jean-Daniel Dupas | Feb 4, 12:14 | |
| Gregory Weston | Feb 4, 14:04 | |
| James Bucanek | Feb 4, 16:28 | |
| William Bates | Feb 4, 20:57 |






Cocoa mail archive

