#### 隐藏文件或文件夹

如此实现

```c#
DirectoryInfo dirInfo = new DirectoryInfo(desDir);
dirInfo.Attributes = FileAttributes.Hidden;//隐藏文件夹

FileInfo dirInfo = new FileInfo(desDir);
dirInfo.Attributes = FileAttributes.Hidden;//隐藏备份的目录
```

