Changeset 318 for trunk/Include/Classes/System/IO/FileSystemInfo.ab
- Timestamp:
- Aug 28, 2007, 9:16:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/System/IO/FileSystemInfo.ab
r292 r318 12 12 OriginalPath As String 13 13 Public 14 'Public Properties 15 Function Attributes() As FileAttributes 16 Select Case m_FileAttributes 17 Case FILE_ATTRIBUTE_ARCHIVE 18 Return FileAttributes.Archive 19 Case FILE_ATTRIBUTE_COMPRESSED 20 Return FileAttributes.Compressed 21 Case FILE_ATTRIBUTE_DIRECTORY 22 Return FileAttributes.Directory 23 Case FILE_ATTRIBUTE_ENCRYPTED 24 Return FileAttributes.Encrypted 25 Case FILE_ATTRIBUTE_HIDDEN 26 Return FileAttributes.Hidden 27 Case FILE_ATTRIBUTE_NORMAL 28 Return FileAttributes.Normal 29 Case FILE_ATTRIBUTE_OFFLINE 30 Return FileAttributes.Offline 31 Case FILE_ATTRIBUTE_READONLY 32 Return FileAttributes.ReadOnly 33 Case FILE_ATTRIBUTE_REPARSE_POINT 34 Return FileAttributes.ReparsePoint 35 Case FILE_ATTRIBUTE_SPARSE_FILE 36 Return FileAttributes.SparseFile 37 Case FILE_ATTRIBUTE_SYSTEM 38 Return FileAttributes.System 39 Case FILE_ATTRIBUTE_TEMPORARY 40 Return FileAttributes.Temporary 41 Case Else 42 'Exception 43 Debug 44 End Select 14 15 Override Function Equals( object As Object ) As Boolean 16 If This.ToString = object.ToString Then 17 Return True 18 Else 19 Return False 20 End If 45 21 End Function 46 22 47 Sub Attributes(ByRef value As FileAttributes) 48 Dim attributes As DWord 49 Select Case value 50 Case FileAttributes.Archive 51 attributes = FILE_ATTRIBUTE_ARCHIVE 52 Case FileAttributes.Compressed 53 attributes = FILE_ATTRIBUTE_COMPRESSED 54 Case FileAttributes.Directory 55 attributes = FILE_ATTRIBUTE_DIRECTORY 56 Case FileAttributes.Hidden 57 attributes = FILE_ATTRIBUTE_HIDDEN 58 Case FileAttributes.Normal 59 attributes = FILE_ATTRIBUTE_NORMAL 60 Case FileAttributes.Offline 61 attributes = FILE_ATTRIBUTE_OFFLINE 62 Case FileAttributes.ReadOnly 63 attributes = FILE_ATTRIBUTE_READONLY 64 Case FileAttributes.System 65 attributes = FILE_ATTRIBUTE_SYSTEM 66 Case FileAttributes.Temporary 67 attributes = FILE_ATTRIBUTE_TEMPORARY 68 Case Else 69 'Exception 70 Exit Sub 71 End Select 23 Override Function ToString() As String 24 Return FullPath 25 End Function 72 26 73 If SetFileAttributes(FullPath, attributes) = FALSE Then 27 'Public Properties 28 Function Attributes() As DWord'FileAttributes 29 Return m_FileAttributes 30 End Function 31 32 Sub Attributes(value As DWord) 33 If SetFileAttributes(FullPath, value) = FALSE Then 74 34 'Exception 75 35 Debug
Note:
See TracChangeset
for help on using the changeset viewer.