Game Development Reference
In-Depth Information
private void ProcessDirectory(string directoryPath)
{
ProcessDirectory(new DirectoryInfo(directoryPath));
}
private void ProcessDirectory(DirectoryInfo directoryInfo)
{
if (cancelled)
return;
ProcessFiles(directoryInfo);
if (recursive)
{
foreach (DirectoryInfo subDirectoryInfo in
directoryInfo.GetDirectories())
ProcessDirectory(subDirectoryInfo);
}
}
private void ProcessFiles(DirectoryInfo directoryInfo)
{
foreach (FileInfo fileInfo in directoryInfo.GetFiles(this.filePattern))
{
if (cancelled)
return;
FileAttributes attributes = File.GetAttributes(fileInfo.FullName);
if ((attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
if (skipReadOnly)
continue;
else if (forceWriteable)
File.SetAttributes(fileInfo.FullName, FileAttributes.Normal);
else
continue;
}
Process(this, fileInfo);
Search Nedrilad ::




Custom Search