copyTo
新しい場所へのアーティファクトのコピー
構文
newArtifacts = copyTo(artifact,destination)
説明
newArtifacts = copyTo(
は新しい場所にアーティファクトをコピーし、更新した artifact
,destination
)matlab.automation.diagnostics.Artifact
インスタンスの配列を返します。copyTo
メソッドは、newArtifacts
の各インスタンスの Location
プロパティを destination
に設定します。
入力引数
artifact
— 新しい場所にコピーするアーティファクト
matlab.automation.diagnostics.FileArtifact
インスタンスの配列
新しい場所にコピーするアーティファクト。matlab.automation.diagnostics.FileArtifact
インスタンスの配列として指定します。
destination
— アーティファクトの新しい場所
文字ベクトル | string スカラー
アーティファクトの新しい場所。文字ベクトルまたは string スカラーとして指定します。
例: tempdir()
例: "mySubFolder
例: 'C:\work'
例
新しい場所へのアーティファクトのコピー
ファイル アーティファクトの配列を作成します。この例では、someFile.m
と anotherFile.m
というファイルが現在のフォルダーに存在していると仮定します。
import matlab.automation.diagnostics.FileArtifact fileArtifact1 = FileArtifact('someFile.m'); fileArtifact2 = FileArtifact('anotherFile.m'); artifacts = [fileArtifact1 fileArtifact2];
アーティファクトを一時フォルダーにコピーします。
destination = tempdir(); newArtifacts = artifacts.copyTo(destination);
バージョン履歴
R2017a で導入
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)