Ignore:
Timestamp:
Mar 2, 2007, 2:57:09 PM (18 years ago)
Author:
イグトランス (egtra)
Message:

#51完了

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/Classes/System/IO/Path.ab

    r62 r125  
    11Class Path
    22Public
    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       ':
    77
    88    Static Function GetFileName(path As String) As String
     
    5050    End Function
    5151
    52     Static Function HasExtension(ByRef path As String) As BOOL
     52    Static Function HasExtension(ByRef path As String) As Boolean
    5353        If GetExtension(path) <> "" Then
    5454            Return _System_TRUE
     
    5959
    6060    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
    6276    End Function
    6377
     
    148162    Return GetTempPath(nBufferLength, lpBuffer)
    149163End Function
     164
     165Function __GetTempFileName(pPathName As PCSTR, pPrefixString As PCSTR, uUnique As DWord, pTempFileName As PSTR) As DWord
     166    Return GetTempFileName(pPathName, pPrefixString, uUnique, pTempFileName)
     167End Function
Note: See TracChangeset for help on using the changeset viewer.