mlreportgen.utils.isFileLocked class

Package: mlreportgen.utils
Superclasses:

Determine if file is locked

Construction

tf = mlreportgen.utils.isFileLocked filename tests whether the file specified using its filename is locked.

Input Arguments

expand all

Name or full path to file to test, specified as a string or character vector.

Output Arguments

expand all

Status of the file, returned as true or false. If the file is locked by another process, true is returned. It the file is not locked, false is returned.

Examples

collapse all

Verify that the output.pdf file is locked.

mlreportgen.utils.isFileLocked('output.pdf')
ans =

  logical

   1

Introduced in R2018b