Ignore:
Timestamp:
Mar 8, 2008, 7:33:08 PM (16 years ago)
Author:
OverTaker
Message:

File.ab,FileInfo.abをそれなりに実装

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/IO/FileSystemInfo.ab

    r462 r466  
    7373    */
    7474    Sub Attributes(value As FileAttributes)
    75         If SetFileAttributes(ToTCStr(FullPath), value) = FALSE Then
    76             'Exception
    77             Debug
     75        If Not SetFileAttributes(ToTCStr(FullPath), value) Then
     76            Throw New IOException("FileSystemInfo.Attributes: Failed to SetFileAttributes.")
    7877        End If
    7978    End Sub
     
    199198    */
    200199    Function Exists() As Boolean
    201         Dim data As WIN32_FIND_DATA
    202         Dim hFind = FindFirstFile(ToTCStr(FullPath), data)
    203         FindClose(hFind)
    204 
    205         If hFind <> INVALID_HANDLE_VALUE Then
    206             Return True
    207         Else
    208             Return False
    209         End If
     200        Return File.Exists(FullPath)
    210201    End Function
    211202
Note: See TracChangeset for help on using the changeset viewer.