| Date: | 2009-10-09 15:57:38 (3 years 7 months ago) |
| Author: | Roman Kassebaum |
| Commit: | 116 |
| Parents: |
115
|
| Message: | Added FileCreate |
File differences
| trunk/Source/ShineOn.RTL/SysUtils.pas |
| 112 | 112 | class function DateTimeToStr(ADateTime:TDateTime):String; |
| 113 | 113 | class function TimeToStr(ATime:TDateTime):String; |
| 114 | 114 | class procedure FreeAndNil(var Obj); |
| 115 | |
| 115 | 116 | class function FileAge(const FileName: String; out FileDateTime: TDateTime): Boolean; |
| 117 | class function FileCreate(const FileName: String): TOpenedFile; |
| 116 | 118 | class function FileExists(FileName: String): Boolean; |
| 117 | 119 | class procedure FileClose(Handle: TOpenedFile); |
| 120 | |
| 118 | 121 | class function DirectoryExists(Directory: String): Boolean; |
| 119 | 122 | class function ForceDirectories(Dir: String): Boolean; |
| 120 | 123 | class function DeleteFile(FileName: String): Boolean; |
| ... | ... | |
| 1362 | 1365 | result := Path.PathSeparator; |
| 1363 | 1366 | end; |
| 1364 | 1367 | |
| 1368 | class function SysUtils.FileCreate(const FileName: String): TOpenedFile; |
| 1369 | begin |
| 1370 | result := System.IO.File.Open(FileName, System.IO.FileMode.&Create); |
| 1371 | end; |
| 1372 | |
| 1365 | 1373 | class procedure SysUtils.FileClose(Handle: TOpenedFile); |
| 1366 | 1374 | begin |
| 1367 | 1375 | if Handle <> nil then |
| ... | ... | |
| 1370 | 1378 | |
| 1371 | 1379 | class function SysUtils.ChangeFilePath(FileName, Path: String): String; |
| 1372 | 1380 | begin |
| 1373 | | Result := IncludeTrailingPathDelimiter(Path) + ExtractFileName(FileName); |
| 1381 | result := IncludeTrailingPathDelimiter(Path) + ExtractFileName(FileName); |
| 1374 | 1382 | end; |
| 1375 | 1383 | |
| 1384 | |
| 1376 | 1385 | // DELPHI COMPATIBLE GLOBAL METHODS |
| 1377 | 1386 | |
| 1378 | 1387 | procedure Sleep(aVal: Integer); |
Download the corresponding diff file