12345678910111213141516171819202122 |
- using System.IO;
- using Utilty.Unit.Directory;
- namespace Utilty.Unit.File
- {
- public class FileUnit
- {
- public static FileStream CheckCreate(string filePath)
- {
- string directoryPath= System.IO.Path.GetDirectoryName(filePath);
- DirectoryUnit.CheckCreate(directoryPath);
- return System.IO.File.Create(filePath);
-
- }
- public static void CheckDelete(string filePath)
- {
- if (System.IO.File.Exists(filePath))
- System.IO.File.Delete(filePath);
- }
- }
- }
|