SecureDelete.FileSearch.AttributeFilter.Allow C# (CSharp) 메소드

Allow() 공개 메소드

public Allow ( string file ) : bool
file string
리턴 bool
        public override bool Allow(string file)
        {
            Debug.AssertNotNull(file, "File is null");
            bool condition = _condition == FilterCondition.IS ? true : false;

            if(File.Exists(file)) {
                FileAttributes attributes = File.GetAttributes(file);

                if((attributes & _attributeValue) == _attributeValue) {
                    return condition;
                }
            }

            return !condition;
        }