public void SetExtendedAttribute(string path, string key, string value, bool restoreLastModificationDate = false) {
#if __MonoCS__
path = Path.GetFullPath(path);
if (!File.Exists(path) && !Directory.Exists(path)) {
throw new FileNotFoundException(string.Format("{0}: on path \"{1}\"", "No such file or directory", path), path);
}
long ret;
if (value == null) {
RemoveExtendedAttribute(path, key);
return;
} else {
ret = Syscall.setxattr(path, prefix + key, Encoding.UTF8.GetBytes(value));
}
if (ret != 0) {
throw new ExtendedAttributeException(string.Format("{0}: on path \"{1}\"", Syscall.GetLastError().ToString(), path));
}
#else
throw new WrongPlatformException();
#endif
}