SecureDelete.FileSearch.AttributeFilter.Allow C# (CSharp) Method

Allow() public method

public Allow ( string file ) : bool
file string
return 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;
        }