' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System

Class MainClass
    Public Shared Sub Parse(ByVal line As String)
        Dim protection As String = line.Substring(0, 10).Trim
        Dim owner As String = line.Substring(11, 19).Trim
        Dim size As Integer = Integer.Parse(line.Substring(32, 8).TrimEnd)
        Dim tim As String = line.Substring(40, 12).Trim
        Dim filename As String = line.Substring(53).Trim
        Console.WriteLine(filename & " " & size & " " & tim)
    End Sub

    Public Shared Sub Main(ByVal args As String())
        Parse("drwxr-xr-x  1 ftp      ftp            0 Sep 01 19:38 Adobe Illustrator 10")
        Parse("drwxr-xr-x  1 ftp      ftp            0 Sep 07 09:36 subdir")
        Parse("-rw-r--r--  1 ftp      ftp      1871872 Sep 07 11:52 a.zip")
        Parse("-rw-r--r--  1 ftp      ftp      21814474 Sep 07 09:53 z.zip")
    End Sub
End Class 
