diff --git a/Centos/Centos.vbproj b/Centos/Centos.vbproj index 1448ea0..72fff7d 100644 --- a/Centos/Centos.vbproj +++ b/Centos/Centos.vbproj @@ -232,6 +232,7 @@ + diff --git a/Centos/Commands/ls.vb b/Centos/Commands/ls.vb new file mode 100644 index 0000000..929f9dd --- /dev/null +++ b/Centos/Commands/ls.vb @@ -0,0 +1,31 @@ +Public Class ls + + Public Property permission As String + Public Property number1 As Integer + Public Property user As String + Public Property group As String + Public Property size As String + Public Property [date] As String + Public Property file As String + Public Property link As String + + Public Overrides Function ToString() As String + Dim fileName As String = If(link.StringEmpty, file, $"{file} -> {link}") + Dim line As String = New String() { + permission, number1, user, group, size, [date], fileName + }.JoinBy(vbTab) + + Return line + End Function + + Public Shared Iterator Function Parse(stdout As String) As IEnumerable(Of ls) + For Each line As String In stdout.LineTokens.Skip(1) + Yield ParseLine(line) + Next + End Function + + Private Shared Function ParseLine(line As String) As ls + + End Function + +End Class