Changeset 136 for Include/Classes/System
- Timestamp:
- Mar 5, 2007, 8:48:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/IO/Path.ab
r125 r136 7 7 8 8 Static Function GetFileName(path As String) As String 9 path.Remove(0, getLastSeparatorPosision(path) + 1) 10 Return path 9 Return path.Remove(0, getLastSeparatorPosision(path) + 1) 11 10 End Function 12 11 … … 19 18 If extPos = -1 Then Return "" 20 19 21 fileName.Remove(extPos) 22 Return fileName 20 Return fileName.Remove(extPos) 23 21 End Function 24 22 … … 36 34 If extPos = -1 Then Return "" 37 35 38 path.Remove(0, extPos) 39 Return path 36 Return path.Remove(0, extPos) 40 37 End Function 41 38 … … 44 41 extPos = getExtensionPosition(path) 45 42 If extPos => 0 Then 46 path .Remove(extPos)43 path = path.Remove(extPos) 47 44 End If 48 45 … … 96 93 If lastSepPos = -1 Then Return "" 97 94 98 path .Remove(lastSepPos)95 path = path.Remove(lastSepPos) 99 96 If path.Length <= 3 Then 100 97 If IsPathRooted(path) Then Return "" … … 105 102 Static Function GetPathRoot(path As String) As String 106 103 If IsPathRooted(path) Then 107 path.Remove(3) 108 Return path 104 Return path.Remove(3) 109 105 Else 110 106 Return "" … … 145 141 Dim lastSepPos As Long 146 142 Dim dirSepChar As String(Chr$(DirectorySeparatorChar)) 147 Dim altDirSepChar As String(Chr$(AltDirectorySeparatorChar))148 143 Dim volSepChar As String(Chr$(VolumeSeparatorChar)) 149 144 lastSepPos = path.LastIndexOf(dirSepChar)
Note:
See TracChangeset
for help on using the changeset viewer.