EDMIService: fix paths on import

This commit is contained in:
Jonathan Jenne
2020-04-14 10:34:30 +02:00
parent bb9dd66d1f
commit 52a6d103e6
2 changed files with 10 additions and 9 deletions

View File

@@ -16,23 +16,24 @@ Public Class Path
_BasePath = DatastoreBasePath
End Sub
Public Function GetActivePath(DocumentType As String)
Public Function GetActivePath(DocumentType As String, Optional FileName As String = "")
Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ACTIVE}
oPathParts.AddRange(GetRelativePath(DocumentType))
oPathParts.AddRange(GetRelativePath(DocumentType, FileName))
Return IO.Path.Combine(oPathParts.ToArray())
End Function
Public Function GetArchivePath(DocumentType As String)
Public Function GetArchivePath(DocumentType As String, Optional FileName As String = "")
Dim oPathParts As New List(Of String) From {_BasePath, PATH_EDMI, PATH_ARCHIVE}
oPathParts.AddRange(GetRelativePath(DocumentType))
oPathParts.AddRange(GetRelativePath(DocumentType, FileName))
Return IO.Path.Combine(oPathParts.ToArray())
End Function
Public Function GetRelativePath(DocumentType As String)
Public Function GetRelativePath(DocumentType As String, Optional FileName As String = "")
Dim oPathParts As New List(Of String) From {DocumentType}
oPathParts.AddRange(GetDatePath())
oPathParts.Add(FileName)
Return IO.Path.Combine(oPathParts.ToArray())
End Function