O'Reilly logo

Microsoft® Visual Basic® 2010 Developer’s Handbook by Klaus Löffelmann and Sarika Calla Purohit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Simplified File Operations with My.Computer.FileSystem

FileInfo and DirectoryInfo already provide considerable assistance for file operations. But the My namespace contains functions that do an even better job; these are responsible for the fact that the backup tool DotNetCopy doesn’t need much code, even though it’s quite flexible.

DotNetCopy uses functions from My.Computer.FileSystem extensively when it performs the actual backup tasks. Especially noteworthy are functions such as GetFiles, which you can use to read the contents of entire directory structures recursively. Optionally, you can retrieve just the files names they contain. This is similar to using the Dir command at a Windows command prompt. Launching Dir with the /S option returns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required