Chapter 8, File and Stream I/O
- Absolute, relative, UNC, and DOS device.
- In the registry editor, set
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabledto1. - The most efficient way to calculate the size of a directory is to get
DirectoryInfofor the directory, followed by the call toGetFileSystemInfos(). You then iterate through the result, adding the length of eachFileInfoobject to get the directory’s size. - The most efficient method of moving files is to obtain
FileInfoobjects from the in-memory cache and then use theFileInfo.MoveTo(string destination)method to move the file. - When you encounter a non-recoverable exception before you exit the application.
IOException.- Local, Local Cache, Roaming, Temporary, and C:\ProgramData.
- Users may only install the software for themselves when prompted. This will result in each logged-on person using the software having their own copy of the data, with the data located in...