Imports DigitalData.Modules.Logging

Public Class frmFilesystem
    Private LogConfig As LogConfig
    Private Filesystem As DigitalData.Modules.Filesystem.File

    Private ShortName As String = "E:\some_test_file.txt"
    Private LongName As String = "E:\some_test_file_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more_data_and_with_some_more.txt"

    Private Sub frmFilesystem_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Try
            LogConfig = New LogConfig(LogConfig.PathType.Temp)
            Filesystem = New DigitalData.Modules.Filesystem.File(LogConfig)

            Using oWriter = IO.File.CreateText("E:\some_test_file.txt")
                oWriter.WriteLine("bla bla bla")
            End Using

            IO.File.Copy(ShortName, LongName)

            Dim oVersion1 = Filesystem.GetVersionedFilename(LongName)
            IO.File.Copy(ShortName, oVersion1)

            Dim oVersion2 = Filesystem.GetVersionedFilename(LongName)
            IO.File.Copy(ShortName, oVersion2)
        Catch ex As Exception

        Finally
            IO.File.Delete(ShortName)
            IO.File.Delete(LongName)
        End Try

    End Sub
End Class