mirror of
https://github.com/jaquadro/NBTExplorer.git
synced 2025-01-11 02:16:24 +00:00
26 lines
610 B
C#
26 lines
610 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.IO;
|
|||
|
using NBTExplorer.Model;
|
|||
|
|
|||
|
namespace NBTUtil.Ops
|
|||
|
{
|
|||
|
class DeleteOperation : ConsoleOperation
|
|||
|
{
|
|||
|
public override bool OptionsValid (ConsoleOptions options)
|
|||
|
{
|
|||
|
return true;
|
|||
|
}
|
|||
|
|
|||
|
public override bool CanProcess (DataNode dataNode)
|
|||
|
{
|
|||
|
return (dataNode != null) && dataNode.CanDeleteNode && (dataNode.Root != dataNode);
|
|||
|
}
|
|||
|
|
|||
|
public override bool Process (DataNode dataNode, ConsoleOptions options)
|
|||
|
{
|
|||
|
return dataNode.DeleteNode();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|