Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Unix-ls/C-sharp/unix-ls.cs
Normal file
25
Task/Unix-ls/C-sharp/unix-ls.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Unix_ls
|
||||
{
|
||||
public class UnixLS
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
UnixLS ls = new UnixLS();
|
||||
ls.list(args.Length.Equals(0) ? "." : args[0]);
|
||||
}
|
||||
|
||||
private void list(string folder)
|
||||
{
|
||||
foreach (FileSystemInfo fileSystemInfo in new DirectoryInfo(folder).EnumerateFileSystemInfos("*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
Console.WriteLine(fileSystemInfo.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue