Revit.SDK.Samples.RoomSchedule.XlsDBConnector.ValidateFile C# (CSharp) Method

ValidateFile() private method

This method will validate and update attributes the specified file. The file should exist and it should have writable attribute. If it's readonly, this method will try to set the attribute to writable.
private ValidateFile ( String strFile ) : bool
strFile String
return bool
        private bool ValidateFile(String strFile)
        {
            // exists check
            if(!File.Exists(strFile)) {
                return false;
            }
            //
            // writable attribute set
            File.SetAttributes(strFile, FileAttributes.Normal);
            return (FileAttributes.Normal == File.GetAttributes(strFile));
        }