Revit.SDK.Samples.RoomSchedule.XlsDBConnector.ValidateFile C# (CSharp) 메소드

ValidateFile() 개인적인 메소드

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
리턴 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));
        }