// Set a non-beagrep attribute
private static void Set(string path, string name, string value)
{
if (!FileSystem.Exists(path))
{
throw new IOException(path);
}
byte[] buffer = encoding.GetBytes(value);
int retval = Syscall.lsetxattr(path, name, buffer);
if (retval == -1)
{
throw new IOException("Could not set extended attribute on " + path + ": " + Mono.Unix.Native.Stdlib.strerror(Mono.Unix.Native.Stdlib.GetLastError()));
}
}