Sign in Join
Wiki copytemporary

CopyFile/fr: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: CopyFile/fr

OldNewLine
1+Unité: Lazarus [[fileutil/fr|fileutil]] (Remplacements UTF-8 pour le code FPC RTL et la gestion supplémentaire de fichiers/répertoires)
2+
3+``` pascal
4+// flags for copy
5+type
6+ TCopyFileFlag = (
7+ cffOverwriteFile,
8+ cffCreateDestDirectory,
9+ cffPreserveTime
10+ );
11+ TCopyFileFlags = set of TCopyFileFlag;
12+
13+function CopyFile(const SrcFilename, DestFilename: string): boolean;
14+function CopyFile(const SrcFilename, DestFilename: string; PreserveTime: boolean): boolean;
15+function CopyFile(const SrcFilename, DestFilename: string; Flags: TCopyFileFlags=[cffOverwriteFile]): boolean;
16+```
17+
18+**copyfile** copie un fichier source vers un emplacement de fichier destination. Optionnellement, il préserve l'estampille horaire du fichier.
19+
20+Exemple:
21+
22+``` pascal
23+uses
24+...
25+fileutil
26+...
27+CopyFile('c:\autoexec.bat','c:\windows\temp\autoexec.bat.backup');
28+```
29+
30+**Résultat de la fonction** : Retourne True en cas de succès, False si une erreur a eu lieu.
31+
32+> **Note:** Si vous voulez utiliser cette fonction dans un programme en ligne de commande, ajoutez une exigence de projet pour LazUtils, lequel ne tirera pas dedans la LCL entière
33+
34+---
35+*From the Free Pascal wiki, page "CopyFile/fr", as it stood on 2020-02-12 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history