Main Content

matlab.unittest.diagnostics.FileArtifact class

Package: matlab.unittest.diagnostics

Artifact associated with a file on disk

Description

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

Construction

artifact = 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.

Introduced in R2017a