| Line | |
|---|
| 1 | unit UFileSystem;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | SysUtils;
|
|---|
| 7 |
|
|---|
| 8 | type
|
|---|
| 9 | TDirectory = class
|
|---|
| 10 | Path: string;
|
|---|
| 11 | procedure Make;
|
|---|
| 12 | procedure Remove;
|
|---|
| 13 | function Exists: Boolean;
|
|---|
| 14 | end;
|
|---|
| 15 |
|
|---|
| 16 | implementation
|
|---|
| 17 |
|
|---|
| 18 | { TDirectory }
|
|---|
| 19 |
|
|---|
| 20 | function TDirectory.Exists: Boolean;
|
|---|
| 21 | begin
|
|---|
| 22 | Result := DirectoryExists(Path);
|
|---|
| 23 | end;
|
|---|
| 24 |
|
|---|
| 25 | procedure TDirectory.Make;
|
|---|
| 26 | begin
|
|---|
| 27 | MkDir(Path);
|
|---|
| 28 | end;
|
|---|
| 29 |
|
|---|
| 30 | procedure TDirectory.Remove;
|
|---|
| 31 | begin
|
|---|
| 32 | RmDir(Path);
|
|---|
| 33 | end;
|
|---|
| 34 |
|
|---|
| 35 | end.
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.