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 | Refresh()
|
---|
12 | End Sub
|
---|
13 |
|
---|
14 | Sub ~FileInfo()
|
---|
15 | End Sub
|
---|
16 |
|
---|
17 | '----------------------------------------------------------------
|
---|
18 | ' Public properties
|
---|
19 | '----------------------------------------------------------------
|
---|
20 |
|
---|
21 | Function Directory() As DirectoryInfo
|
---|
22 | Return New DirectoryInfo(Path.GetDirectoryName(FullPath))
|
---|
23 | End Function
|
---|
24 |
|
---|
25 | Function DirectoryName() As String
|
---|
26 | Return Path.GetDirectoryName(FullPath)
|
---|
27 | End Function
|
---|
28 |
|
---|
29 | Function IsReadOnly() As Boolean
|
---|
30 | If (Attributes And FILE_ATTRIBUTE_READONLY) = FILE_ATTRIBUTE_READONLY Then
|
---|
31 | Return True
|
---|
32 | Else
|
---|
33 | Return False
|
---|
34 | End If
|
---|
35 | End Function
|
---|
36 | End Class
|
---|
37 |
|
---|
38 |
|
---|
39 |
|
---|
40 | End Namespace
|
---|
41 | End Namespace
|
---|
Note:
See
TracBrowser
for help on using the repository browser.