internal void AddPathList(FileIOPermissionAccess access, String[] pathList, bool checkForDuplicates, bool needFullPath)
{
VerifyAccess(access);
if (pathList == null)
{
throw new ArgumentNullException("pathList");
}
if (pathList.Length == 0)
{
throw new ArgumentException(Environment.GetResourceString("Argument_EmptyPath"));
}
HasIllegalCharacters(pathList);
m_unrestricted = false;
if ((access & FileIOPermissionAccess.Read) != 0)
{
if (m_read == null)
{
m_read = new FileIOAccess();
}
m_read.AddExpressions(pathList, checkForDuplicates, needFullPath);
}
if ((access & FileIOPermissionAccess.Write) != 0)
{
if (m_write == null)
{
m_write = new FileIOAccess();
}
m_write.AddExpressions(pathList, checkForDuplicates, needFullPath);
}
if ((access & FileIOPermissionAccess.Append) != 0)
{
if (m_append == null)
{
m_append = new FileIOAccess();
}
m_append.AddExpressions(pathList, checkForDuplicates, needFullPath);
}
if ((access & FileIOPermissionAccess.PathDiscovery) != 0)
{
if (m_pathDiscovery == null)
{
m_pathDiscovery = new FileIOAccess(true);
}
m_pathDiscovery.AddExpressions(pathList, checkForDuplicates, needFullPath);
}
}