91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

ExtractFilePath - C++ Builder

c++
小云
83
2023-09-28 07:04:34
欄目: 編程語言

ExtractFilePath is a function in C++ Builder that is used to extract the directory path from a given file path.

Syntax:

AnsiString ExtractFilePath(const AnsiString& path);

Parameters:

  • path: The input file path from which the directory path needs to be extracted.

Return Value:

  • The directory path extracted from the input file path.

Example:

#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include <System.IOUtils.hpp>
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString filePath = "C:\\Program Files\\MyApp\\data\\file.txt";
AnsiString directoryPath = ExtractFilePath(filePath);
ShowMessage(directoryPath);
}

In the above example, the ExtractFilePath function is used to extract the directory path “C:\Program Files\MyApp\data\” from the file path “C:\Program Files\MyApp\data\file.txt”. The extracted directory path is then displayed using the ShowMessage function.

0
辉南县| 湘阴县| 冀州市| 虹口区| 东海县| 金塔县| 康马县| 绍兴县| 隆子县| 阳曲县| 东乡县| 弥勒县| 攀枝花市| 彭阳县| 镇巴县| 平山县| 文水县| 琼中| 庆阳市| 泸定县| 汝阳县| 临汾市| 县级市| 怀化市| 正镶白旗| 富源县| 定日县| 无为县| 扎囊县| 农安县| 宝丰县| 监利县| 陆河县| 拜城县| 锡林浩特市| 佛冈县| 忻城县| 龙海市| 潢川县| 昆山市| 泊头市|