yes i know that and i found out how to exclude all the unwanted folders specially the hidden one... but for some reason it includes this file
ae1a6083e25e839c285e48eaaff1ee
and based from its attributes it does not have hidden,read,system,compressed attributes now i dont know why i cant open it... im doing this checking if the folder is valid to be included
<pre>public bool isValidDirectory(string path) {
bool isvalid = true;
bool isReadOnly = ((File.GetAttributes(path) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly);
bool isHidden = ((File.GetAttributes(path) & FileAttributes.Hidden) == FileAttributes.Hidden);
bool isArchive = ((File.GetAttributes(path) & FileAttributes.Archive) == FileAttributes.Archive);
bool isSystem = ((File.GetAttributes(path) & FileAttributes.System) == FileAttributes.System);
bool isEncryted = ((File.GetAttributes(path) & FileAttributes.Encrypted ) == FileAttributes.Encrypted);
bool isCompressed = ((File.GetAttributes(path) & FileAttributes.Compressed) == FileAttributes.Compressed);
bool isNotContentIndexed = ((File.GetAttributes(path) & FileAttributes.NotContentIndexed) == FileAttributes.NotContentIndexed);
bool isSparseFile = ((File.GetAttributes(path) & FileAttributes.SparseFile) == FileAttributes.SparseFile);
bool isTemporary = ((File.GetAttributes(path) & FileAttributes.Temporary) == FileAttributes.Temporary);
bool isNormal = ((File.GetAttributes(path) & FileAttributes.Normal) == FileAttributes.Normal);
if (isReadOnly || isHidden || isArchive || isSystem || isEncryted || isCompressed || isNotContentIndexed || isSparseFile || isTemporary)
{
if (!isNormal)
{
isvalid = false;
}
}
return isvalid;
}
but it still lists the folder and when i try to open it, it gives me an error i dont know how to solve this... i dont know how to exclude this type of file... is there a way to find out if i can "OPEN" the file?