mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-07-08 18:06:41 +00:00
29 lines
824 B
C#
29 lines
824 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace SabreTools.Wrappers
|
|
{
|
|
public partial class XDVDFS : IWritable
|
|
{
|
|
/// <inheritdoc/>
|
|
public bool Write(string outputDirectory, bool includeDebug)
|
|
{
|
|
// Get the base path
|
|
string outputFilename = Filename is null
|
|
? Guid.NewGuid().ToString()
|
|
: Path.GetFileName(Filename);
|
|
outputFilename += ".xiso";
|
|
string outputPath = Path.Combine(outputDirectory, outputFilename);
|
|
|
|
var writer = new Serialization.Writers.XDVDFS();
|
|
if (!writer.SerializeFile(Model, outputPath))
|
|
{
|
|
if (includeDebug) Console.WriteLine("Model was invalid, cannot write!");
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|