The first application that adopts this technology is my search file console program. The objective of this program is to retrieve all the files by searching through the particular location (including the remote media and network media).
This is not an error I guess, it just unable to retrieve the debug information. I do not know how to solve this problem, if you read this post and have any suggestion on this, do let me know. Thus I have to recreate the project by choosing “Win32 Console Application” under the Win32 category.
Now, the primary keys to deal with Files are DirectoryInfo, FileSystemInfo, and FileAttributes. The sample below will show all the files (not directory) in C drive.
DirectoryInfo ^di = gcnew DirectoryInfo("C:\\");
for each(FileSystemInfo ^fsi in di->GetFileSystemInfos())
{
if(fsi->Attributes != FileAttributes::Directory)
{
Console::WriteLine(fsi->Name);
}
}
No comments:
Post a Comment