Partager via


exists, fonction

Spécifie si un fichier existe.

inline bool exists(
   file_status Stat
);
template<class Path>
inline bool exists(
   const Path& Pval
);

Paramètres

  • Stat
    Objet d'file_status.

  • Pval
    Objet Path. Path peut être soit un basic_path soit un type dérivé de basic_path.

Valeur de retour

La première fonction retourne status_known(Stat) && Stat.type() != file_not_found.

La deuxième fonction retourne exists(status(Pval)).

Notes

Un file_status représente un fichier existant si le file_type sous-jacent est connu

Configuration requise

En-tête : filesystem

Espace de noms : std::tr2::sys

Voir aussi

Référence

<filesystem>

status_known, fonction

status, fonction

file_type, énumération

Autres ressources

Fichiers d'en-tête de bibliothèque standard C++