Changeset 62 for Include/Classes/System/IO
- Timestamp:
- Jan 16, 2007, 6:56:18 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/IO/Path.ab
r61 r62 69 69 Static Function GetFullPath(path As String) As String 70 70 Dim cd As String 71 Dim dirSepChar As String(Chr$(DirectorySeparatorChar)) 72 If IsPathRooted(path) Then Return path 73 71 74 cd.ReSize = GetCurrentDirectory(0, 0) - 1 72 75 GetCurrentDirectory(cd.Length + 1, cd) 73 74 Dim dirSepChar As String(Chr$(DirectorySeparatorChar))75 76 Return cd + dirSepChar + path 76 77 End Function … … 128 129 129 130 Static Function getLastSeparatorPosision(ByRef path As String) As Long 131 Dim lastSepPos As Long 130 132 Dim dirSepChar As String(Chr$(DirectorySeparatorChar)) 131 Dim lastSepPos As Long 133 Dim altDirSepChar As String(Chr$(AltDirectorySeparatorChar)) 134 Dim volSepChar As String(Chr$(VolumeSeparatorChar)) 132 135 lastSepPos = path.LastIndexOf(dirSepChar) 136 If lastSepPos <> -1 Then Return lastSepPos 133 137 134 If lastSepPos = -1 Then135 Dim volSepChar As String(Chr$(VolumeSeparatorChar))136 lastSepPos = path.LastIndexOf(volSepChar) 137 End If138 lastSepPos = path.LastIndexOf(dirSepChar) 139 If lastSepPos <> -1 Then Return lastSepPos 140 141 lastSepPos = path.LastIndexOf(volSepChar) 138 142 Return lastSepPos 139 143 End Function
Note:
See TracChangeset
for help on using the changeset viewer.