Changeset 435 for trunk/Include/Classes/System/IO
- Timestamp:
- Feb 28, 2008, 1:39:16 AM (17 years ago)
- Location:
- trunk/Include/Classes/System/IO
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/IO/Exception.ab
r391 r435 64 64 */ 65 65 Sub ThrowWinIOException(msg As String, error As DWord) 66 ' Throw IOException(msg, HRESULT_FROM_WIN32(error))66 Throw New IOException(msg, HRESULT_FROM_WIN32(error)) 67 67 End Sub 68 68 … … 74 74 */ 75 75 Sub ThrowWinLastErrorIOException(msg As String) 76 ' Throw IOException(msg, HRESULT_FROM_WIN32(GetLastError()))76 Throw New IOException(msg, HRESULT_FROM_WIN32(GetLastError())) 77 77 End Sub 78 78 End Namespace -
trunk/Include/Classes/System/IO/File.ab
r432 r435 27 27 28 28 Enum FileMode 29 Append = OPEN_ALWAYS30 Create = CREATE_ALWAYS31 CreateNew = CREATE_NEW32 Open = OPEN_EXISTING33 OpenOrCreate = OPEN_ALWAYS34 Truncate = TRUNCATE_EXISTING29 Append = 4 'OPEN_ALWAYS 30 Create = 2 'CREATE_ALWAYS 31 CreateNew = 1 'CREATE_NEW 32 Open = 3 'OPEN_EXISTING 33 OpenOrCreate = 4 'OPEN_ALWAYS 34 Truncate = 5 'TRUNCATE_EXISTING 35 35 End Enum 36 36 -
trunk/Include/Classes/System/IO/FileStream.ab
r432 r435 34 34 /* コンストラクタ.NETと同じように実装は難しい、一先ず動くものを実装したが変更が必要だと思う */ 35 35 Sub FileStream(path As String, mode As FileMode, access As FileAccess, share As FileShare, options As FileOptions) 36 If ActiveBasic.IsNothing(path) Then 37 Throw New ArgumentNullException("path") 38 ElseIf path.Length = 0 Then 39 Throw New ArgumentException 40 End If 41 42 36 43 Dim ac = access As DWord 37 44 Dim sh = share As DWord … … 49 56 'Throw System.IO.FileNotFoundException 50 57 This.handle=0 51 Beep(220,500)58 Detail.ThrowWinLastErrorIOException("Failed to open/create file.") 52 59 Exit Sub 53 60 End If -
trunk/Include/Classes/System/IO/StreamReader.ab
r432 r435 50 50 Override Function Read() As Long 51 51 Read = Peek() 52 cur++ 52 If Read <> -1 Then 53 cur++ 54 End If 53 55 End Function 54 56
Note:
See TracChangeset
for help on using the changeset viewer.