

| návštěv dnes: | 15 |
| návštěv včera: | 43 |
| návštěv za měsíc: | 237 |
| návštěv celkem: | 17541 |
| Složka - Kopie, přesun, smazání |
|
|
| Napsal uživatel Administrator |
| Úterý, 05 Květen 2009 09:19 |
|
uses ShellApi; function CopyDir(const fromDir, toDir: string): Boolean; var fos: TSHFileOpStruct; begin ZeroMemory(@fos, SizeOf(fos)); with fos do begin wFunc := FO_COPY; fFlags := FOF_FILESONLY; pFrom := PChar(fromDir + #0); pTo := PChar(toDir) end; Result := (0 = ShFileOperation(fos)); end; function MoveDir(const fromDir, toDir: string): Boolean; var fos: TSHFileOpStruct; begin ZeroMemory(@fos, SizeOf(fos)); with fos do begin wFunc := FO_MOVE; fFlags := FOF_FILESONLY; pFrom := PChar(fromDir + #0); pTo := PChar(toDir) end; Result := (0 = ShFileOperation(fos)); end; function DelDir(dir: string): Boolean; var fos: TSHFileOpStruct; begin ZeroMemory(@fos, SizeOf(fos)); with fos do begin wFunc := FO_DELETE; fFlags := FOF_SILENT or FOF_NOCONFIRMATION; pFrom := PChar(dir + #0); end; Result := (0 = ShFileOperation(fos)); end; Zdroj: http://www.swissdelphicenter.ch/en/showcode.php?id=152 |
| Aktualizováno Úterý, 05 Květen 2009 09:26 |


Založeno na Joomla!. Designed by: Free Joomla 1.5 Template, dns. Valid XHTML and CSS.