Simply3DScan
FileHelper.cs
Go to the documentation of this file.
1 using System.IO;
2 
3 namespace SharedObjects
4 {
8  public static class FileHelper
9  {
14  public static void CreatePathIfNotExisting(string folder)
15  {
16  bool exists = Directory.Exists(folder);
17 
18  if (!exists)
19  Directory.CreateDirectory(folder);
20  }
21 
26  public static void DeleteAllFilesInFolder(string imageFolder)
27  {
28  DirectoryInfo downloadedMessageInfo = new DirectoryInfo(imageFolder);
29 
30  foreach (FileInfo file in downloadedMessageInfo.GetFiles())
31  {
32  file.Delete();
33  }
34  }
35  }
36 }
static void CreatePathIfNotExisting(string folder)
Creates the path if not existing.
Definition: FileHelper.cs:14
static File Helpers
Definition: FileHelper.cs:8
static void DeleteAllFilesInFolder(string imageFolder)
Deletes all files in folder.
Definition: FileHelper.cs:26