Line | |
---|
1 | Namespace System |
---|
2 | Namespace IO |
---|
3 | |
---|
4 | |
---|
5 | Class FileInfo |
---|
6 | Inherits FileSystemInfo |
---|
7 | Public |
---|
8 | Sub FileInfo(path As String) |
---|
9 | OriginalPath = path |
---|
10 | FullPath = Path.GetFullPath(path) |
---|
11 | End Sub |
---|
12 | |
---|
13 | Sub ~FileInfo() |
---|
14 | End Sub |
---|
15 | |
---|
16 | '---------------------------------------------------------------- |
---|
17 | ' Public properties |
---|
18 | '---------------------------------------------------------------- |
---|
19 | |
---|
20 | Function Directory() As DirectoryInfo |
---|
21 | Return New DirectoryInfo(Path.GetDirectoryName(FullPath)) |
---|
22 | End Function |
---|
23 | |
---|
24 | Function DirectoryName() As String |
---|
25 | Return Path.GetDirectoryName(FullPath) |
---|
26 | End Function |
---|
27 | |
---|
28 | Function IsReadOnly() As Boolean |
---|
29 | If (Attributes and FileAttributes.ReadOnly) = FileAttributes.ReadOnly Then |
---|
30 | Return True |
---|
31 | Else |
---|
32 | Return False |
---|
33 | End If |
---|
34 | End Function |
---|
35 | End Class |
---|
36 | |
---|
37 | |
---|
38 | |
---|
39 | End Namespace |
---|
40 | End Namespace |
---|
Note: See
TracBrowser
for help on using the repository browser.