Changeset 407 for trunk/Include/Classes/System/IO/FileSystemInfo.ab
- Timestamp:
- Feb 17, 2008, 12:51:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/IO/FileSystemInfo.ab
r406 r407 245 245 Virtual Sub Delete() 246 246 If DeleteFile(ToTCStr(FullPath)) = FALSE Then 247 Throw 'Exception247 Throw New IOException("DriveInfo.Delete: Failed to DeleteFile.") 248 248 End If 249 249 End Sub … … 258 258 FindClose(hFind) 259 259 260 m_FileAttributes = New FileAttributes(data.dwFileAttributes As Long, "FileAttributes") 261 m_CreationTime = data.ftCreationTime 262 m_LastAccessTime = data.ftLastAccessTime 263 m_LastWriteTime = data.ftLastWriteTime 264 265 m_IsFreshed = True 260 If hFind <> INVALID_HANDLE_VALUE Then 261 m_FileAttributes = New FileAttributes(data.dwFileAttributes As Long, "FileAttributes") 262 m_CreationTime = data.ftCreationTime 263 m_LastAccessTime = data.ftLastAccessTime 264 m_LastWriteTime = data.ftLastWriteTime 265 m_IsFreshed = True 266 Else 267 Throw New IOException("DriveInfo.Refresh: Failed to FindFirstFile.") 268 End If 266 269 End Sub 267 270 … … 280 283 Dim hFile = CreateFile(ToTCStr(FullPath), GENERIC_WRITE, FILE_SHARE_READ Or FILE_SHARE_WRITE, ByVal 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0) 281 284 If hFile = INVALID_HANDLE_VALUE Then 282 debug 'Exception285 Throw New IOException("DriveInfo.setFileTime: Failed to CreateFile.") 283 286 Exit Function 284 287 End If 285 288 286 289 If SetFileTime(hFile, m_CreationTime, m_LastAccessTime, m_LastWriteTime) = False Then 287 debug 'Exception290 Throw New IOException("DriveInfo.setFileTime: Failed to SetFileTime.") 288 291 End If 289 292
Note:
See TracChangeset
for help on using the changeset viewer.