System.SysUtils.ChangeFilePath

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function ChangeFilePath(const FileName, Path: string): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall ChangeFilePath(const System::UnicodeString FileName, const System::UnicodeString Path)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

説明

ファイル名のパスを変更します。

ChangeFilePath は、渡された FileName のドライブ レター部分とディレクトリ部分を、渡された Path 値で置き換えます。Path を指定する場合は、ドライブ レター(末尾がコロン)とディレクトリ(末尾がバックスラッシュ)の両方またはいずれか一方を指定する必要があります。

ChangeFilePath は、実際のファイルの名前を変更するのではなく、新しいファイル名文字列を作成するだけです。

メモ:  この関数はマルチバイト文字セット(MBCS)で動作します。

関連項目