Please enable JavaScript to view this site.

xcall MIAMEX, MX_MKDIR, dirspec, status {,remoteflag}

(Windows only) MX_MKDIR (MIAMEX 97) provides a native Windows equivalent to MX_MKPATH to create a directory.

This function has both a subroutine and a print tab implementation.

Parameters

Parameter

Type

I/O

Description

dirspec

String

in

the directory name to create. This should be in native file format, but (as of build 960) may include embedded environment variables—e.g. %miame%\newdir.

status

Num

out

will return 0 for success, else a Windows system error number (183 for already-exists). -15 indicates ATE timeout. See MX_ERRNOMSG for translating system error codes to messages.

remoteflag

String,1

in

may be optionally specified to clarify, in ATE environments, whether the directory is to be created on the server ("L" for local or "S" for server) or on the ATE client ("R" for remote or "C" for client). Specifying "L" on a Unix machine is an error (returns status = -1) because this MIAMEX function only creates Windows directories.

 

Comments

MX_MKDIR will be invoked automatically if MX_MKPATH is requested under Windows. But your application still needs to be aware of whether it is running under Windows or Unix because the directory naming syntax is typically different. Note that to create a directory on the ATE client, you must use MX_MKDIR, since MX_MKPATH does not have the remoteflag option.

There is no harm in attempting to create a directory that already exists; in fact, this may be easier than trying to first determine whether it exists. If the directory already existed, the return value will be 183, which should probably be handled as a non-error.

In general this function will not succeed if the parent directory doesn't already exist.

See Also

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software