Please enable JavaScript to view this site.

A-Shell Development History

954.0.1

Implement a new API for copying/moving files via MIAMEX,MX_COPYFILE (27):

Old syntax (copy from open input channel to open output channel)

xcall MIAMEX,27,chin, chout

New (optional) syntax:

xcall MIAMEX,27, src$, dst$ {,flags {,status}}

Parameters

src$, dst$  [in]

file specifications, either AMOS or native

flags  [in]  (default 0)

Symbol

Value

Meaning

CPYF_MOVE

&h0001

Move file instead of Copy file

CPYF_REPL

&h0002

Allow replacement of existing destination

 

status  [out]

Value

Meaning

0

Success

-1

Destinations exists and CPYF_REPL flag not specified

-2

Source doesn't exist

-3

Invalid parameter types

<other>

System error code. For UNIX, this will be the return code from the mv or cp utility. For Windows, it will be a Windows system error code (translatable by MIAMEX,86).

 

Some advantages of the new method:

Move option is much more efficient than copy, provided source and destination are on the same volume or file system. If not, then the move is simulated by a Copy followed by a Delete of the source.
The new Move preserves the file creation and file modification times.
The new Copy preserves the file modification time (but updates the file creation time because it is creating a new file). In contrast, with the old syntax, both the creation time and modification time are updated.
Simplifies the logic for protecting against accidental overwrite, as well as for detecting common errors in the operation. With the old method, in addition to needing the separate file opens and closes, you would have needed to also use lookup operations to check for the most common considerations of source-doesn't-exist or destination-already-exists.

Note that under UNIX, the operation invokes the mv or cp utilities, which must be available in the PATH.

954.0.2

XTREE no longer requires that the multilevel indicator column (type @) be the first column defined. This is mainly useful as a workaround to an unresolved bug which sometimes causes the first defined column to be visible even when the column type is set to H for hide.

954.0.3

LOOKUP.LIT 1.0(102) now supports quoted native filespecs up to 160 characters long. Previously, quoted specs did not work, the limit was 50 characters, and certain unquoted native specs would not work either.