Changeset 125 for Include/Classes/System/IO/Path.ab
- Timestamp:
- Mar 2, 2007, 2:57:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/IO/Path.ab
r62 r125 1 1 Class Path 2 2 Public 3 Static AltDirectorySeparatorChar = &H2F As Byte'/4 Static DirectorySeparatorChar = &H5C As Byte'\5 Static PathSeparator = &H3B As Byte';6 Static VolumeSeparatorChar = &H3A As Byte':3 Static AltDirectorySeparatorChar = &H2F As Char '/ 4 Static DirectorySeparatorChar = &H5C As Char '\ 5 Static PathSeparator = &H3B As Char '; 6 Static VolumeSeparatorChar = &H3A As Char ': 7 7 8 8 Static Function GetFileName(path As String) As String … … 50 50 End Function 51 51 52 Static Function HasExtension(ByRef path As String) As B OOL52 Static Function HasExtension(ByRef path As String) As Boolean 53 53 If GetExtension(path) <> "" Then 54 54 Return _System_TRUE … … 59 59 60 60 Static Function GetTempFileName() As String 61 ' TODO: 実装 61 Dim tempPathSize = __GetTempPath(0, 0) 62 Dim tempPath = _System_malloc(SizeOf (TCHAR) * tempPathSize) As PTSTR 63 If tempPath = 0 Then 64 ' Throw OutOfMemoryException 65 Debug 66 End If 67 If __GetTempPath(tempPathSize, tempPath) > tempPathSize Then 68 ' Throw IOException? 69 Debug 70 End If 71 72 Dim tempFileName[ELM(MAX_PATH)] As TCHAR 73 __GetTempFileName(tempPath, "ABT", 0, tempFileName) 74 free(tempPath) 75 Return tempFileName 62 76 End Function 63 77 … … 148 162 Return GetTempPath(nBufferLength, lpBuffer) 149 163 End Function 164 165 Function __GetTempFileName(pPathName As PCSTR, pPrefixString As PCSTR, uUnique As DWord, pTempFileName As PSTR) As DWord 166 Return GetTempFileName(pPathName, pPrefixString, uUnique, pTempFileName) 167 End Function
Note:
See TracChangeset
for help on using the changeset viewer.