namespace Beam.Exports {
public interface IExporter {
///
/// Synchronously writes the object to the desired path, creating it if it does not exist.
///
/// The path of the exported object
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);
}
}
}