removeFile
ファイルまたはフォルダーをプロジェクトから削除
説明
removeFile(
は、指定したプロジェクトからファイルまたはフォルダーを削除します。proj
,fileOrfolder
)
例
プロジェクトからファイルを削除する
プロジェクト Times Table App を開きます。currentProject
を使用して、現在読み込まれているプロジェクトからプロジェクト オブジェクトを作成します。
openExample("matlab/TimesTableProjectExample")
proj = currentProject;
ファイルを削除します。
removeFile(proj,"source/timesTableGame.m")
ファイルをプロジェクトに再度追加します。
addFile(proj,"source/timesTableGame.m")
入力引数
proj
— プロジェクト
matlab.project.Project
オブジェクト
プロジェクト。matlab.project.Project
オブジェクトとして指定します。currentProject
を使用して、現在読み込まれているプロジェクトからプロジェクト オブジェクトを作成します。
fileOrfolder
— 削除するファイルまたはフォルダー
文字ベクトル | string スカラー | ProjectFile
オブジェクト
削除するファイルまたはフォルダー。文字ベクトル、string スカラー、または ProjectFile
オブジェクトとして指定します。fileOrfolder
を文字ベクトルまたは string スカラーとして指定する場合、プロジェクトのルート フォルダーを基準とした、ファイル拡張子を含む削除対象ファイルへの相対パスが含まれていなければなりません。ファイルまたはフォルダーはプロジェクト内になければなりません。
バージョン履歴
R2019a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)