public virtual bool SetReadOnly (FilePath path) { try { var fileAttributes = File.GetAttributes (path) | FileAttributes.ReadOnly; File.SetAttributes (path, fileAttributes); return true; } catch { return false; } }