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:
Wolfgang Sourdeau
2011-06-04 00:13:43 +00:00
parent 33ae25f6be
commit 75ea772c42
3 changed files with 31 additions and 0 deletions

View File

@@ -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.

View File

@@ -45,6 +45,9 @@
- (SOGoMAPIFSMessage *) newMessage;
- (void) ensureDirectory;
- (NSCalendarDate *) creationTime;
- (NSCalendarDate *) lastModificationTime;
@end
#endif /* SOGOMAPIFSFOLDER_H */

View File

@@ -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