public bool IsSubsetOf(FileIOAccess operand) { if (operand == null) { return(this.IsEmpty()); } if (operand.m_allFiles) { return(true); } if ((!this.m_pathDiscovery || !this.m_set.IsSubsetOfPathDiscovery(operand.m_set)) && !this.m_set.IsSubsetOf(operand.m_set)) { if (!operand.m_allLocalFiles) { return(false); } string[] array = this.m_set.UnsafeToStringArray(); for (int i = 0; i < array.Length; i++) { string root = FileIOAccess.GetRoot(array[i]); if (root == null || !FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root))) { return(false); } } } return(true); }
public bool IsSubsetOf(FileIOAccess operand) { if (operand == null) { return(this.IsEmpty()); } if (operand.m_allFiles || this.m_pathDiscovery && this.m_set.IsSubsetOfPathDiscovery(operand.m_set) || this.m_set.IsSubsetOf(operand.m_set)) { return(true); } if (!operand.m_allLocalFiles) { return(false); } foreach (string @string in this.m_set.UnsafeToStringArray()) { string root = FileIOAccess.GetRoot(@string); if (root == null || !FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root))) { return(false); } } return(true); }
public FileIOAccess Intersect(FileIOAccess operand) { if (operand == null) { return((FileIOAccess)null); } if (this.m_allFiles) { if (operand.m_allFiles) { return(new FileIOAccess(true, false, this.m_pathDiscovery)); } return(new FileIOAccess(operand.m_set.Copy(), false, operand.m_allLocalFiles, this.m_pathDiscovery)); } if (operand.m_allFiles) { return(new FileIOAccess(this.m_set.Copy(), false, this.m_allLocalFiles, this.m_pathDiscovery)); } StringExpressionSet set = new StringExpressionSet(this.m_ignoreCase, true); if (this.m_allLocalFiles) { string[] stringArray = operand.m_set.UnsafeToStringArray(); if (stringArray != null) { for (int index = 0; index < stringArray.Length; ++index) { string root = FileIOAccess.GetRoot(stringArray[index]); if (root != null && FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root))) { set.AddExpressions(new string[1] { stringArray[index] }, 1 != 0, 0 != 0); } } } } if (operand.m_allLocalFiles) { string[] stringArray = this.m_set.UnsafeToStringArray(); if (stringArray != null) { for (int index = 0; index < stringArray.Length; ++index) { string root = FileIOAccess.GetRoot(stringArray[index]); if (root != null && FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root))) { set.AddExpressions(new string[1] { stringArray[index] }, 1 != 0, 0 != 0); } } } } string[] stringArray1 = this.m_set.Intersect(operand.m_set).UnsafeToStringArray(); if (stringArray1 != null) { set.AddExpressions(stringArray1, !set.IsEmpty(), false); } return(new FileIOAccess(set, false, this.m_allLocalFiles && operand.m_allLocalFiles, this.m_pathDiscovery)); }
public FileIOAccess Intersect(FileIOAccess operand) { if (operand == null) { return(null); } if (this.m_allFiles) { if (operand.m_allFiles) { return(new FileIOAccess(true, false, this.m_pathDiscovery)); } return(new FileIOAccess(operand.m_set.Copy(), false, operand.m_allLocalFiles, this.m_pathDiscovery)); } else { if (operand.m_allFiles) { return(new FileIOAccess(this.m_set.Copy(), false, this.m_allLocalFiles, this.m_pathDiscovery)); } StringExpressionSet stringExpressionSet = new StringExpressionSet(this.m_ignoreCase, true); if (this.m_allLocalFiles) { string[] array = operand.m_set.UnsafeToStringArray(); if (array != null) { for (int i = 0; i < array.Length; i++) { string root = FileIOAccess.GetRoot(array[i]); if (root != null && FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root))) { stringExpressionSet.AddExpressions(new string[] { array[i] }, true, false); } } } } if (operand.m_allLocalFiles) { string[] array2 = this.m_set.UnsafeToStringArray(); if (array2 != null) { for (int j = 0; j < array2.Length; j++) { string root2 = FileIOAccess.GetRoot(array2[j]); if (root2 != null && FileIOAccess.IsLocalDrive(FileIOAccess.GetRoot(root2))) { stringExpressionSet.AddExpressions(new string[] { array2[j] }, true, false); } } } } string[] array3 = this.m_set.Intersect(operand.m_set).UnsafeToStringArray(); if (array3 != null) { stringExpressionSet.AddExpressions(array3, !stringExpressionSet.IsEmpty(), false); } return(new FileIOAccess(stringExpressionSet, false, this.m_allLocalFiles && operand.m_allLocalFiles, this.m_pathDiscovery)); } }