mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-04-21 19:24:00 +00:00
20 lines
470 B
C#
20 lines
470 B
C#
|
|
using System;
|
||
|
|
|
||
|
|
namespace CMLeonOS.Commands.FileSystem
|
||
|
|
{
|
||
|
|
public static class CatCommand
|
||
|
|
{
|
||
|
|
public static void ProcessCat(CMLeonOS.FileSystem fileSystem, string args, Action<string> showError)
|
||
|
|
{
|
||
|
|
if (string.IsNullOrEmpty(args))
|
||
|
|
{
|
||
|
|
showError("Please specify a file name");
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
Console.WriteLine(fileSystem.ReadFile(args));
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|