System.IO, Zugferd

This commit is contained in:
2024-09-23 09:53:59 +02:00
parent 9337d563e5
commit 0db7067b42
14 changed files with 152 additions and 152 deletions

View File

@@ -157,12 +157,12 @@ Public Class cProgrammeUpdate
Dim LIST_SOURCE As New List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)
Dim dirNameReplace_SOURCE = ""
Dim DI_SOURCE As New IO.DirectoryInfo(sourcePfad)
Dim DI_SOURCE As New System.IO.DirectoryInfo(sourcePfad)
RekursivGetFiles(DI_SOURCE, dirNameReplace_SOURCE, LIST_SOURCE, {})
Dim LIST_DEST As New List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate)
Dim dirNameReplace_DEST = ""
Dim DI_DEST As New IO.DirectoryInfo(destPfad)
Dim DI_DEST As New System.IO.DirectoryInfo(destPfad)
RekursivGetFiles(DI_DEST, dirNameReplace_DEST, LIST_DEST, ignoreFilesBeginWith)
If LIST_SOURCE.Count = 0 Then
@@ -175,8 +175,8 @@ Public Class cProgrammeUpdate
'ORDNER erstellen:
For Each f In LIST_SOURCE
If If(f.pud_filePathFolder, "") <> "" Then
If Not IO.Directory.Exists(dirNameReplace_DEST & "\" & f.pud_filePathFolder) Then '.Replace("\\", "\")
IO.Directory.CreateDirectory(dirNameReplace_DEST & "\" & f.pud_filePathFolder) '.Replace("\\", "\")
If Not System.IO.Directory.Exists(dirNameReplace_DEST & "\" & f.pud_filePathFolder) Then '.Replace("\\", "\")
System.IO.Directory.CreateDirectory(dirNameReplace_DEST & "\" & f.pud_filePathFolder) '.Replace("\\", "\")
End If
End If
Next
@@ -184,7 +184,7 @@ Public Class cProgrammeUpdate
'Löschen der unbenötigten Files:
For Each f In LIST_DEST
If isOldFile(f, LIST_SOURCE) Then
IO.File.Delete(dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName) '.Replace("\\", "\")
System.IO.File.Delete(dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName) '.Replace("\\", "\")
End If
Next
@@ -195,7 +195,7 @@ Public Class cProgrammeUpdate
Dim s_path = dirNameReplace_SOURCE & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName '.Replace("\\", "\")
Dim d_path = dirNameReplace_DEST & "\" & If(f.pud_filePathFolder, "") & "\" & f.pud_fileName '.Replace("\\", "\")
d_path = d_path '.replace("\\", "\")
IO.File.Copy(s_path, d_path)
System.IO.File.Copy(s_path, d_path)
End If
Next
@@ -214,8 +214,8 @@ Public Class cProgrammeUpdate
Return False
End Function
Public Shared Sub RekursivGetFiles(ByVal oDir As System.IO.DirectoryInfo, ByRef dirNameReplace As String, ByRef LIST As List(Of VERAG_PROG_ALLGEMEIN.cProgrammeUpdate), ignoreFilesBeginWith As String())
Dim oSubDir As IO.DirectoryInfo
Dim FI As IO.FileInfo
Dim oSubDir As System.IO.DirectoryInfo
Dim FI As System.IO.FileInfo
' zunächst alle Dateien des Ordners aufspüren
For Each FI In oDir.GetFiles()

View File

@@ -237,7 +237,7 @@ Public Class cRMC
VERARBEITUNG_PFAD = cRMC.Paramter.GET_PARAM_ByName("VERARBEITUNG_PFAD", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
ZIEL_PFAD = cRMC.Paramter.GET_PARAM_ByName("ZIEL_PFAD", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
PDFRECHNUNGEN = cRMC.Paramter.GET_PARAM_ByName("PDFRECHNUNGEN", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
If Not IO.Directory.Exists(VERARBEITUNG_PFAD) Then IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
If Not System.IO.Directory.Exists(VERARBEITUNG_PFAD) Then System.IO.Directory.CreateDirectory(VERARBEITUNG_PFAD)
Return Paramter.getFTPConenction(API_STRING, API, programName)