PsiFS: SWI Calls

PsiFS_AsyncStart

PsiFS_AsyncStart
(SWI &520C5)
Start an asynchronous remote operation

On entry:R0 =reason code
Other registers depend on reason code

On exit:R0 =handle for the operation

Interrupts:Interrupt status is undefined
Fast interrupts are enabled

Processor mode:Processor is in SVC mode

Re-entrancy:SWI is not re-entrant

Use: This call starts an asynchronous remote operation, depending on the reason code in R0. Valid reason codes are:
ValueMeaning
0Close the specified open files
1Open the specified files
2Read a single file
3Write a single file
4Backup a single directory tree
5Write and start a single file
6Write and install a file

These operations may only be performed if the remote link is enabled and a connection has been established. If a connection has not been established, then the operation will complete with an error status.

Any PsiFS file names supplied as parameters must be of the form :drive.$.file/directory where drive is a single character drive letter (A to Z), and file/directory is the path to the object. Other file names may be specified in any convenient form, although use of canonicalised paths is recommended.


Related SWIs:PsiFS_AsyncEnd, PsiFS_AsyncPoll, PsiFS_AsyncControl

Related vectors:None

PsiFS_AsyncStart 0
(SWI &520C5)
Close the specified open files

On entry:R0 =0
R1 =pointer to control-character terminated pattern to match (0 for none)
R2 =pointer to control-character terminated file name
R3 =append to end of file (0 overwrites)

On exit:R0 =handle for the operation

Use: Close all tasks with open files that match the specified wildcarded pattern. If no pattern is specified then all tasks are closed. A list of the files closed is written to the specified file in a suitable format for subsequently restarting the tasks.

PsiFS_AsyncStart 1
(SWI &520C5)
Open the specified files

On entry:R0 =1
R1 =pointer to control-character terminated file name
R2 =delete file when finished (0 leaves it)

On exit:R0 =handle for the operation

Use: Restart the tasks listed in the specified file. Each line of the file should contain two file names separated by a space; the first is the application to start, and the second file is the file to open. If an application should be started without opening a file then the second file name should be left blank, but the space must still be included.

PsiFS_AsyncStart 2
(SWI &520C5)
Read a single file

On entry:R0 =2
R1 =pointer to control-character terminated source file name
R2 =pointer to control-character terminated destination file name

On exit:R0 =handle for the operation

Use: Read the specified file from the SIBO or EPOC device.

PsiFS_AsyncStart 3
(SWI &520C5)
Write a single file

On entry:R0 =3
R1 =pointer to control-character terminated source file name
R2 =pointer to control-character terminated destination file name
R3 =delete file when finished (0 leaves it)

On exit:R0 =handle for the operation

Use: Write the specified file to the SIBO or EPOC device.

PsiFS_AsyncStart 4
(SWI &520C5)
Backup a single directory tree

On entry:R0 =4
R1 =pointer to control-character terminated source directory
R2 =pointer to control-character terminated destination backup file name
R3 =pointer to control-character terminated previous backup file name (0 for none)
R4 =pointer to control-character terminated scrap backup file name (0 for none)
R5 =pointer to control-character terminated temporary file name

On exit:R0 =handle for the operation

Use: Perform a backup of all files starting from the specified SIBO or EPOC directory. The output is written to a tar file to preserve long filenames, using the fltar (Archie) extensions to store datestamp and attribute information. If a previous backup file is specified then unmodified files are simply copied rather than being retrieved from the SIBO or EPOC device. If a scrap backup file is also specified then files not used from the previous backup file are copied to keep a record of previous versions.

PsiFS_AsyncStart 5
(SWI &520C5)
Write and start a single file

On entry:R0 =5
R1 =pointer to control-character terminated source file name
R2 =pointer to control-character terminated destination file name
R3 =pointer to control-character terminated executable file name (0 for none)
R4 =delete file when finished (0 leaves it)

On exit:R0 =handle for the operation

Use: Write the specified file to the SIBO or EPOC device and start it. If an executable file name is specified then that it used to open the file, otherwise the copied file is itself assumed to be executable.

PsiFS_AsyncStart 6
(SWI &520C5)
Write and install a file

On entry:R0 =6
R1 =pointer to control-character terminated installer executable file name
R2 =pointer to control-character terminated installer source file name
R3 =pointer to control-character terminated installer destination file name
R4 =delete installer file when finished (0 leaves it)
R5 =pointer to control-character terminated package source file name
R6 =pointer to control-character terminated package destination file name
R7 =delete package file when finished (0 leaves it)

On exit:R0 =handle for the operation

Use: Ensure that the specified installer is present on the SIBO or EPOC device, and then use it to open the specified package.

This checks if the specified executable is present, and if not the installer file is copied and executed. Note that all drives are searched for the executable; the drive specified is only used if the installer file is executed. The package file itself is then copied, and the installer executable used to open it.

The typical use of this operation is to install SIS files on EPOC devices, ensuring first that the Add/remove icon is present on the control panel.


[Contents] [Up] Copyright © Alexander Thoukydides, 1998, 1999, 2000, 2001, 2002