Sharpen.FileHelper.SetReadOnly C# (CSharp) Method

SetReadOnly() public method

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