ZUGFeRD Job: add versioning of moved files

This commit is contained in:
Jonathan Jenne
2019-09-18 15:40:18 +02:00
parent 3d55483a56
commit 0ec5829275
8 changed files with 59 additions and 13 deletions

View File

@@ -96,6 +96,11 @@ Public Class File
IO.File.Move(FilePath, Path.Combine(Directory, oFileInfo.Name))
End Sub
Public Sub MoveTo(FilePath As String, NewFileName As String, Directory As String)
Dim oFileInfo As New FileInfo(FilePath)
IO.File.Move(FilePath, Path.Combine(Directory, NewFileName))
End Sub
''' <summary>
''' Tries to create a directory and returns its path.
''' Returns a temp path if `DirectoryPath` can not be created or written to.