Add project files.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
namespace Beam.Exports {
|
||||
public interface IExporter {
|
||||
/// <summary>
|
||||
/// Synchronously writes the object to the desired path, creating it if it does not exist.
|
||||
/// </summary>
|
||||
/// <param name="path">The path of the exported object</param>
|
||||
public void Write(string path);
|
||||
|
||||
protected void EnsurePathExists(string path) {
|
||||
if (File.Exists(path)) {
|
||||
File.Delete(path);
|
||||
return;
|
||||
}
|
||||
else if (!Directory.Exists(path))
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user