BlueGEEK Journal

Accueil > Manip’s > Delphi > Embarcadero XE3 > FileAge déprécié (Deprecated)

FileAge déprécié (Deprecated)

mercredi 13 mars 2013, par bluegyn_spip

Pour avoir la date d’un Fichier :

Ancienne écriture


- L’argument de FileAge est le nom du fichier
- La fonction retourne un entier correspondant à la date du fichier

  • Convertie en Date
    • Puis convertie en chaine.

Nouvelle écriture (dite surchargée)

- La fonction retourne vrai si la lecture réussit
- Et reçoit 2 paramètres obligatoires :

  1. Le Nom du Fichier
  2. L’adresse de la Date du Fichier qui est remplie, par une valeur DateTime, (et non plus filedatetime) qui peut être simplement retournée telle qu’elle comme une date standard ou convertie en chaine.

Voir en ligne : http://docwiki.embarcadero.com/Libr...


Returns the OS time stamp of a file.

- Call FileAge to obtain the OS time stamp of the file specified by the FileName parameter.

- The first overload returns an integer that represents the OS time stamp of the file. The result can be later converted to a TDateTime using the FileDateToDateTime function.

- Note : The first overloaded version of FileAge is deprecated. Use the second version of FileAge instead.
- The second overload returns the time stamp of FileName in the FileDateTime output parameter. If the FileName parameter is a symbolic link and the FollowLink parameter is set to True, the method is performed on the target file. If the first condition is True, but the FollowLink parameter is set to False, the time stamp of the symbolic link is returned.
- The return value is True if the operation succeeded, or False otherwise.