A hackish service that helps the watch folder component gracefully handle moved or renamed files. Since the watch folders are only notified of added and removed paths, we have to make educated guesses when files are moved or renamed. If we don't we delete and then re-add media items, b breaking existing playlists and lose information like ratings. More...
import"sbIWFMoveRenameHelper9000.idl";
Public Member Functions | |
void | process (in nsIArray aMediaItems, in nsIArray aNewPaths, in sbIJobProgressListener aListener) |
Infer moved/renamed media items based on changes to the file system. This method will block, processing events until all updates are complete. More... | |
A hackish service that helps the watch folder component gracefully handle moved or renamed files. Since the watch folders are only notified of added and removed paths, we have to make educated guesses when files are moved or renamed. If we don't we delete and then re-add media items, b breaking existing playlists and lose information like ratings.
Ultimately the file system watcher should be able to report move and rename events, but that is not possible at this time. This is a temporary helper for the watch folders only, and should not be used anywhere else.
Definition at line 47 of file sbIWFMoveRenameHelper9000.idl.
void sbIWFMoveRenameHelper9000::process | ( | in nsIArray | aMediaItems, |
in nsIArray | aNewPaths, | ||
in sbIJobProgressListener | aListener | ||
) |
Infer moved/renamed media items based on changes to the file system. This method will block, processing events until all updates are complete.
aMediaItems | an array media items that may have been moved or renamed |
aAddedPaths | an array of candidate nsIFile paths |
aListener | Optional in-param to listen to when the opertion has finished. |