mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 22:09:29 +00:00
Monotone-Parent: ae1a7958cd81c59ed7bbcddc2a53188885222d07
Monotone-Revision: a3454a89b34b8bb6dd1906bf066c6d929fc08428 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-06-04T00:13:43 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
2011-06-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/SOGoMAPIFSFolder.m (-creationTime)
|
||||
(-lastModificationTime): new self-explicit accessors.
|
||||
(-initWithURL:andTableType:): accept the "MAPISTORE_FOLDER_TABLE",
|
||||
for storing folder properties.
|
||||
|
||||
* OpenChange/SOGoMAPIFSMessage.m (-completeFilename): new method
|
||||
that returns the full filename for the property list file.
|
||||
(-appendProperties:) simplified method.
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
- (SOGoMAPIFSMessage *) newMessage;
|
||||
- (void) ensureDirectory;
|
||||
|
||||
- (NSCalendarDate *) creationTime;
|
||||
- (NSCalendarDate *) lastModificationTime;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOMAPIFSFOLDER_H */
|
||||
|
||||
@@ -97,6 +97,8 @@ static NSString *privateDir = nil;
|
||||
tableParticle = @"message";
|
||||
else if (tableType == MAPISTORE_FAI_TABLE)
|
||||
tableParticle = @"fai";
|
||||
else if (tableType == MAPISTORE_FOLDER_TABLE)
|
||||
tableParticle = @"folder";
|
||||
else
|
||||
{
|
||||
[NSException raise: @"MAPIStoreIOException"
|
||||
@@ -228,4 +230,25 @@ static NSString *privateDir = nil;
|
||||
return object;
|
||||
}
|
||||
|
||||
- (id) _fileAttributeForKey: (NSString *) key
|
||||
{
|
||||
NSDictionary *attributes;
|
||||
|
||||
attributes = [[NSFileManager defaultManager]
|
||||
fileAttributesAtPath: directory
|
||||
traverseLink: NO];
|
||||
|
||||
return [attributes objectForKey: key];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) creationTime
|
||||
{
|
||||
return [self _fileAttributeForKey: NSFileCreationDate];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) lastModificationTime
|
||||
{
|
||||
return [self _fileAttributeForKey: NSFileModificationDate];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user