MS windream
This commit is contained in:
parent
a8a9dd84eb
commit
dc82b42e7a
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.0.0.2")>
|
<Assembly: AssemblyVersion("1.0.0.3")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
@ -101,6 +101,8 @@ Public Class Windream
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Creates a new Windream object and connects to a server with the provided options and credentials
|
''' Creates a new Windream object and connects to a server with the provided options and credentials
|
||||||
@ -731,7 +733,7 @@ Public Class Windream
|
|||||||
If UsesDriveLetter Then
|
If UsesDriveLetter Then
|
||||||
' Remove Driveletter eg. W:\
|
' Remove Driveletter eg. W:\
|
||||||
If oNormalizedPath.StartsWith($"{ClientDriveLetter}:\") Then
|
If oNormalizedPath.StartsWith($"{ClientDriveLetter}:\") Then
|
||||||
oNormalizedPath = oNormalizedPath.Substring(ClientDriveLetter + 2)
|
oNormalizedPath = oNormalizedPath.Substring(ClientDriveLetter.Length + 2)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If oNormalizedPath.ToLower.StartsWith(ClientBasePath.ToLower) Then
|
If oNormalizedPath.ToLower.StartsWith(ClientBasePath.ToLower) Then
|
||||||
@ -1104,6 +1106,7 @@ Public Class Windream
|
|||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
_logger.Error(ex)
|
_logger.Error(ex)
|
||||||
|
UnlockObject(oWMObject)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
@ -1343,6 +1346,25 @@ Public Class Windream
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
Public Function VersionWMFilename(pPath As String, pExt As String)
|
||||||
|
Dim rNewFilepath As String = pPath
|
||||||
|
pPath = GetNormalizedPath(pPath)
|
||||||
|
Dim oPath = pPath.Substring(0, pPath.LastIndexOf("\"))
|
||||||
|
Dim oFilename = pPath.Substring(pPath.LastIndexOf("\") + 1, pPath.Length - pPath.LastIndexOf("\") - 1)
|
||||||
|
Dim oCheck = oFilename
|
||||||
|
Dim oSplit As List(Of String) = oFilename.Split("~").ToList()
|
||||||
|
oFilename = oFilename.Replace(pExt, "")
|
||||||
|
Dim oCount As Integer = 2
|
||||||
|
Do While TestFileExists(rNewFilepath) = True
|
||||||
|
oFilename = oFilename.Replace(pExt, "")
|
||||||
|
Dim oVersion = "~" + (oCount - 1).ToString
|
||||||
|
oFilename = oFilename.Replace(oVersion, "")
|
||||||
|
oFilename = oFilename & "~" & oCount & pExt
|
||||||
|
oCount += 1
|
||||||
|
rNewFilepath = oPath + "\" + oFilename
|
||||||
|
Loop
|
||||||
|
Return rNewFilepath
|
||||||
|
End Function
|
||||||
Public Function TestFolderExists(Path As String) As Boolean
|
Public Function TestFolderExists(Path As String) As Boolean
|
||||||
Return TestObjectExists(GetNormalizedPath(Path), WMEntityFolder)
|
Return TestObjectExists(GetNormalizedPath(Path), WMEntityFolder)
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user