source: branches/CoreData/SapphireFrappliance/MetaData/SapphireMObjects/SapphireDirectoryMetaData.h @ 764

Revision 764, 1.8 KB checked in by gbooker, 6 years ago (diff)
  • Added ability to rename directories as well as files
  • Added ability to move files/dirs around in file system and retain metadata in the process
  • Added error handling and presentation of messages for move/rename
Line 
1#import "_SapphireDirectoryMetaData.h"
2#import "SapphireDirectory.h"
3#import "SapphireBasicDirectoryFunctionsDefines.h"
4
5#define SapphireDirectoryMetaDataName           @"DirectoryMetaData"
6
7@class SapphireMetaDataUpgrading;
8
9@interface SapphireDirectoryMetaData : _SapphireDirectoryMetaData <SapphireDirectory, SapphireImporterBackgroundProtocol>
10{
11        int                                                             importing;                              /*!< @brief bit 0 is set if background importing of data, bit 1 if awaiting data*/\
12        NSMutableArray                                  *importArray;                   /*!< @brief Array of objects left to import*/
13        NSMutableDictionary                             *cachedLookup;                  /*!< @brief Cache to accellerate directory/file lookup*/
14        NSMutableArray                                  *cachedFiles;                   /*!< @brief Cached list of files*/
15        NSMutableArray                                  *cachedDirs;                    /*!< @brief Cached list of dirs*/
16        Basic_Directory_Function_Instance_Variables
17}
18
19+ (SapphireDirectoryMetaData *)directoryWithPath:(NSString *)path inContext:(NSManagedObjectContext *)moc;
20+ (SapphireDirectoryMetaData *)createDirectoryWithPath:(NSString *)path inContext:(NSManagedObjectContext *)moc;
21+ (SapphireDirectoryMetaData *)createDirectoryWithPath:(NSString *)path parent:(SapphireDirectoryMetaData *)parent inContext:(NSManagedObjectContext *)moc;
22+ (NSDictionary *)upgradeV1DirectoriesFromContext:(NSManagedObjectContext *)oldMoc toContext:(NSManagedObjectContext *)newMoc;
23- (void)insertDictionary:(NSDictionary *)dict withDefer:(NSMutableDictionary *)defer andDisplay:(SapphireMetaDataUpgrading *)display;
24- (void)rescanDirWithExistingDirs:(NSMutableArray *)existingDirs files:(NSMutableArray *)existingFiles symDirs:(NSMutableArray *)existingSymDirs symFiles:(NSMutableArray *)existingSymFiles;
25
26/*!
27 * @brief Moves a file to a new directory and updates metadata
28 *
29 * @param dir The new directory for the file
30 */
31- (NSString *)moveToDir:(SapphireDirectoryMetaData *)dir;
32@end
Note: See TracBrowser for help on using the repository browser.