xcall MIAMEX, MX_FSPEC, spec, locpath, ext, flags, ddb, status
MAP1 SPEC,S,40 ! DevPPN specification
MAP1 LOCPATH,S,160 ! Local (native OS) equivalent fspec
MX_FSPEC is used as an approximation to the FSPEC butterscotch call. It takes an AMOS format file specification or device name (spec), and processes it into its constituent parts of Device name, File name, and extension (ddb). It also optionally returns the host machine pathname corresponding to the DevPPN specification in locpath.
Parameters
spec (String) [in]
should contain the AMOS-format file specification that you want to parse or convert to native format. If the device and/or PPN are omitted, they will be supplied by your current login directory. If the extension is omitted, it will be supplied by the ext parameter. Note that the file does not need to exist, but it must have valid syntax (e.g. "a.a") and not be null (or else an invalid filespec error will result and the returned locpath will either be null or the previously processed filespec). See Comments, below, for information on how to retrieve the current native directory.
locpath (String) [out]
is only used if you wish to return the host machine pathname for the file specification given in spec. This is specified by the FS_TOH bit in the flags parameter, in which case the variable locpath should be mapped to an appropriate length for the longest path you expect to deal with. (The maximum path length under Windows is 260 characters.) Otherwise, the parameter may be specified as a null string (""), and it will be set to "" in case of error.
ext (String) [in]
is the default extension to use when processing a full file specification. It will be used if the given specification contains only a filename and no extension. The extension used is returned in the extension field of the ddb structure variable, and is used in the host format pathname if one is returned.
flags (Num) [in]
is used to determine exactly how the file specification processing is to take place. It is bit-mapped, and each bit may be set by adding together the symbolic values defined in the include file ashell.def.
Symbol |
Value |
Description |
|---|---|---|
FS_DRV |
1 |
indicates that the drive name and number only are to be processed. When used in conjunction with FS_FMA (2), the device specification given in spec is returned in the ddb structure parameter. |
FS_FMA |
2 |
indicates that the file specification given in the spec parameter is to be used. Otherwise the already processed specification given in its constituent parts in the ddb structure parameter will be used. It only makes sense to omit this bit if the FS_TOH (4) bit is set, indicating that a host machine pathname is to be returned. |
FS_TOH |
4 |
indicates that the host machine path name corresponding either to the file specification in spec or in the ddb structure parameter is to be returned in the locpath parameter. If this bit is not specified then locpath may be given as a null string ("") |
Definition file: ashell.def |
||
ddb (Structure) [in/out]
is a structure defined in the include file, ashell.bsi, and is defined as follows:
MAP1 DDB
MAP2 DEV,s,6 ! 6 characters AMOS device
MAP2 FILNAM,s,32 ! 6 characters AMOS or 32 host
MAP2 EXT,s,8 ! 3 characters AMOS or 8 host
MAP2 PRJ,s,3 ! 3 character justified P
MAP2 PRG,s,3 ! 3 character justified PN
xcall MIAMEX, MX_FSPEC, spec, locpath, ext, flags, ddb, status
MAP1 SPEC,S,40 ! DevPPN specification
MAP1 LOCPATH,S,160 ! Local (native OS) equivalent fspec
MX_FSPEC is used as an approximation to the FSPEC butterscotch call. It takes an AMOS format file specification or device name (spec), and processes it into its constituent parts of Device name, File name, and extension (ddb). It also optionally returns the host machine pathname corresponding to the DevPPN specification in locpath.
Parameters
spec (String) [in]
should contain the AMOS-format file specification that you want to parse or convert to native format. If the device and/or PPN are omitted, they will be supplied by your current login directory. If the extension is omitted, it will be supplied by the ext parameter. Note that the file does not need to exist, but it must have valid syntax (e.g. "a.a") and not be null (or else an invalid filespec error will result and the returned locpath will either be null or the previously processed filespec). See Comments, below, for information on how to retrieve the current native directory.
locpath (String) [out]
is only used if you wish to return the host machine pathname for the file specification given in spec. This is specified by the FS_TOH bit in the flags parameter, in which case the variable locpath should be mapped to an appropriate length for the longest path you expect to deal with. (The maximum path length under Windows is 260 characters.) Otherwise, the parameter may be specified as a null string (""), and it will be set to "" in case of error.
ext (String) [in]
is the default extension to use when processing a full file specification. It will be used if the given specification contains only a filename and no extension. The extension used is returned in the extension field of the ddb structure variable, and is used in the host format pathname if one is returned.
flags (Num) [in]
is used to determine exactly how the file specification processing is to take place. It is bit-mapped, and each bit may be set by adding together the symbolic values defined in the include file ashell.def.
Symbol |
Value |
Description |
|---|---|---|
FS_DRV |
1 |
indicates that the drive name and number only are to be processed. When used in conjunction with FS_FMA (2), the device specification given in spec is returned in the ddb structure parameter. |
FS_FMA |
2 |
indicates that the file specification given in the spec parameter is to be used. Otherwise the already processed specification given in its constituent parts in the ddb structure parameter will be used. It only makes sense to omit this bit if the FS_TOH (4) bit is set, indicating that a host machine pathname is to be returned. |
FS_TOH |
4 |
indicates that the host machine path name corresponding either to the file specification in spec or in the ddb structure parameter is to be returned in the locpath parameter. If this bit is not specified then locpath may be given as a null string ("") |
Definition file: ashell.def |
||
ddb (Structure) [in/out]
is a structure defined in the include file, ashell.bsi, and is defined as follows:
MAP1 DDB
MAP2 DEV,s,6 ! 6 characters AMOS device
MAP2 FILNAM,s,32 ! 6 characters AMOS or 32 host
MAP2 EXT,s,8 ! 3 characters AMOS or 8 host
MAP2 PRJ,s,3 ! 3 character justified P
MAP2 PRG,s,3 ! 3 character justified PN
xcall MIAMEX, MX_FSPEC, spec, locpath, ext, flags, ddb, status
MAP1 SPEC,S,40 ! DevPPN specification
MAP1 LOCPATH,S,160 ! Local (native OS) equivalent fspec
MX_FSPEC is used as an approximation to the FSPEC butterscotch call. It takes an AMOS format file specification or device name (spec), and processes it into its constituent parts of Device name, File name, and extension (ddb). It also optionally returns the host machine pathname corresponding to the DevPPN specification in locpath.
Parameters
spec (String) [in]
should contain the AMOS-format file specification that you want to parse or convert to native format. If the device and/or PPN are omitted, they will be supplied by your current login directory. If the extension is omitted, it will be supplied by the ext parameter. Note that the file does not need to exist, but it must have valid syntax (e.g. "a.a") and not be null (or else an invalid filespec error will result and the returned locpath will either be null or the previously processed filespec). See Comments, below, for information on how to retrieve the current native directory.
locpath (String) [out]
is only used if you wish to return the host machine pathname for the file specification given in spec. This is specified by the FS_TOH bit in the flags parameter, in which case the variable locpath should be mapped to an appropriate length for the longest path you expect to deal with. (The maximum path length under Windows is 260 characters.) Otherwise, the parameter may be specified as a null string (""), and it will be set to "" in case of error.
ext (String) [in]
is the default extension to use when processing a full file specification. It will be used if the given specification contains only a filename and no extension. The extension used is returned in the extension field of the ddb structure variable, and is used in the host format pathname if one is returned.
flags (Num) [in]
is used to determine exactly how the file specification processing is to take place. It is bit-mapped, and each bit may be set by adding together the symbolic values defined in the include file ashell.def.
Symbol |
Value |
Description |
|---|---|---|
FS_DRV |
1 |
indicates that the drive name and number only are to be processed. When used in conjunction with FS_FMA (2), the device specification given in spec is returned in the ddb structure parameter. |
FS_FMA |
2 |
indicates that the file specification given in the spec parameter is to be used. Otherwise the already processed specification given in its constituent parts in the ddb structure parameter will be used. It only makes sense to omit this bit if the FS_TOH (4) bit is set, indicating that a host machine pathname is to be returned. |
FS_TOH |
4 |
indicates that the host machine path name corresponding either to the file specification in spec or in the ddb structure parameter is to be returned in the locpath parameter. If this bit is not specified then locpath may be given as a null string ("") |
Definition file: ashell.def |
||
ddb (Structure) [in/out]
is a structure defined in the include file, ashell.bsi, and is defined as follows:
MAP1 DDB
MAP2 DEV,s,6 ! 6 characters AMOS device
MAP2 FILNAM,s,32 ! 6 characters AMOS or 32 host
MAP2 EXT,s,8 ! 3 characters AMOS or 8 host
MAP2 PRJ,s,3 ! 3 character justified P
MAP2 PRG,s,3 ! 3 character justified PN