public virtual bool NeedsToBeUpdatedFromPath(NSString path)
{
NSFileManager fm = NSFileManager.DefaultManager;
switch (_wrapperType)
{
case GSFileWrapperType.GSFileWrapperRegularFileType:
if (FileAttributes().IsEqualToDictionary(fm.FileAttributesAtPath(path, false)))
return false;
break;
case GSFileWrapperType.GSFileWrapperSymbolicLinkType:
if (((NSString)_wrapperData).IsEqualToString(fm.PathContentOfSymbolicLinkAtPath(path)))
return false;
break;
case GSFileWrapperType.GSFileWrapperDirectoryType:
// Has the dictory itself changed?
if (!FileAttributes().IsEqualToDictionary(fm.FileAttributesAtPath(path, false)))
return true;
// FIXME - for directory wrappers, we have to check if all the files are still there,
// if they have the same attributes and if any new files have been added.
// And this recursive for all included file wrappers
return false;
break;
}
return true;
}