System.IOUtils.TFile.ReadAllLines

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

class function ReadAllLines(const Path: string): TStringDynArray;
class function ReadAllLines(const Path: string;  const Encoding: TEncoding): TStringDynArray; overload; static;

C++

static System::DynamicArray<System::UnicodeString> __fastcall ReadAllLines(const System::UnicodeString Path)/* overload */;
static System::DynamicArray<System::UnicodeString> __fastcall ReadAllLines(const System::UnicodeString Path, System::Sysutils::TEncoding* const Encoding)/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.IOUtils.pas
System.IOUtils.hpp
System.IOUtils TFile

Description

Lit le contenu d'un fichier textuel dans un tableau de chaînes.

Utilisez ReadAllLines pour lire le contenu d'un fichier textuel. ReadAllLines renvoie un nouveau tableau de chaînes contenant les lignes de texte du fichier. Le tableau suivant liste les paramètres attendus par cette méthode.



Nom Signification

Path

Le chemin au fichier.

Encoding

L'encodage du texte contenu dans le fichier.



Remarque :  ReadAllLines déclenche une exception si le fichier ne peut pas être ouvert ou si le chemin n'est pas valide.

Voir aussi