source: trunk/Packages/Kernel/Kernel.FileSystem.pas

Last change on this file was 60, checked in by chronos, 8 months ago
  • Modified: Remove U prefix from unit names.
File size: 939 bytes
Line 
1unit Kernel.FileSystem;
2
3interface
4
5uses
6 Classes, SysUtils, Kernel.List;
7
8type
9 TFileSystemObject = class(TNamedObject)
10
11 end;
12
13 TFile = class(TFileSystemObject)
14 Size: Integer;
15 end;
16
17 { TDirectory }
18
19 TDirectory = class(TFileSystemObject)
20 Items: TNamedObjects<TFileSystemObject>;
21 constructor Create;
22 destructor Destroy; override;
23 end;
24
25 { TFileSystem }
26
27 TFileSystem = class
28 TopDirectory: TDirectory;
29 constructor Create;
30 destructor Destroy; override;
31 end;
32
33 TFileSystemClass = class of TFileSystem;
34
35
36implementation
37
38{ TFileSystem }
39
40constructor TFileSystem.Create;
41begin
42 TopDirectory := TDirectory.Create;
43end;
44
45destructor TFileSystem.Destroy;
46begin
47 TopDirectory.Free;
48 inherited Destroy;
49end;
50
51{ TDirectory }
52
53constructor TDirectory.Create;
54begin
55 Items := TNamedObjects<TFileSystemObject>.Create;
56end;
57
58destructor TDirectory.Destroy;
59begin
60 FreeAndNil(Items);
61 inherited;
62end;
63
64end.
65
Note: See TracBrowser for help on using the repository browser.