Main Content

matlab.automation.diagnostics.FileArtifact Class

Namespace: matlab.automation.diagnostics

Artifact associated with a file on disk

Renamed from matlab.unittest.diagnostics.FileArtifact in R2023a

Description

Use the FileArtifact class to refer to files on disk and to copy the files to a new location. The automation framework instantiates this class, so you are not required to create an object of the class directly.

Construction

artifact = matlab.automation.diagnostics.FileArtifact(filename) creates an artifact associated with a particular file on disk.

Input Arguments

expand all

Name of file on disk, specified as a character vector or string scalar.

Example: "myFile.txt"

Properties

expand all

Artifact name, returned as a string scalar. For example, if the full path of a file artifact is "C:\Hello\World.txt", the value of Name would be "World.txt".

The parent folder where the artifact is located, returned as a string scalar.

Example: If the full path of a file artifact is "C:\Hello\World.txt", the value of Location is "C:\Hello".

The full path to the artifact, returned as a string scalar.

Example: "C:\Hello\World.txt"

Methods

copyToCopy artifacts to new location

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Version History

Introduced in R2017a

expand all