RISCOS.com

www.riscos.com Technical Support:
Programmer's Reference Manual

 

Filer_Action and FilerSWIs


Introduction and Overview

The Filer_Action module performs file manipulation operations for the Filer without the desktop hanging whilst they are under way. See the chapter entitled Filer Action Window for details of how the Filer Action window operates.

The FilerSWIs module provides SWIs to help make starting Filer_Action easier.

SWI calls


FilerAction_SendSelectedDirectory
(SWI &40F80)

Sends message specifying the selected directory

On entry

R0 = task handle to which to send the message
R1 = pointer to null terminated directory name

On exit

--

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 sends the Wimp message Message_FilerSelectionDirectory (see Message_FilerSelectionDirectory (&403)).

For a description of how messages within the Wimp environment are generated see Wimp_SendMessage.

Related SWIs

FilerAction_SendSelectedFile, FilerAction_SendStartOperation

Related vectors

None


FilerAction_SendSelectedFile
(SWI &40F81)

Sends message specifying the selected files within a directory

On entry

R0 = task handle to which to send the message
R1 = pointer to null terminated selection name

On exit

--

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 accumulates the names of selected files that you pass to it. When it has received sufficient filenames to fill a Wimp message block it sends those names using the Wimp message Message_FilerAddSelection (see Message_FilerAddSelection (&404)). The same message is used to send any unsent filenames if you subsequently call FilerAction_SendStartOperation.

For a description of how messages within the Wimp environment are generated see Wimp_SendMessage.

Related SWIs

FilerAction_SendSelectedDirectory, FilerAction_SendStartOperation

Related vectors

None


FilerAction_SendStartOperation
(SWI &40F82)

Sends message containing information to start operation

On entry

R0 = task handle to which to send the message
R1 = reason code:

0 Copy
1 Move (rename)
2 Delete
3 Set access
4 Set type
5 Count
6 Move (by copying and deleting afterwards)
7 Copy local (within directory)
8 Stamp files
9 Find file
R2 = option bits:
Bit Meaning when set
0 Verbose
1 Confirm
2 Force
3 Newer (as opposed to just Look)
4 Recurse (only applies to access)
R3 = pointer to operation specific data
R4 = length of operation specific data:
Copy

R3 - pointer to name of destination directory (null terminated)
R4 - length of name of destination directory (including null terminator)

Move

R3 - pointer to name of destination directory (null terminated)
R4 - length of name of destination directory (including null terminator)

Delete

R3 - unused
R4 - 0

Set access

R3 - pointer to word containing required new access:

bottom two bytes indicate the values to set
top two bytes flag which bits are to be left alone

R4 - 4

Set type

R3 - pointer to word containing new type in bits 0-11
R4 - 4

Count

R3 - unused
R4 - 0

Copy Move

R3 - pointer to name of destination directory (null terminated)
R4 - length of name of destination directory (including null terminator)

Copy Local

R3 - pointer to destination name (null terminated)
R4 - length of name of destination name (including null terminator)

Stamp

R3 - unused
R4 - 0

Find

R3 - pointer to name of object to find (null terminated)
R4 - length of name of object to find (including null terminator)

On exit

--

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 sends the Wimp message Message_FilerAction (see Message_FilerAction (&405)). Before doing so, it uses Message_FilerAddSelection to send any filenames passed to Filer_Action using FilerAction_SendSelectedFile that have not already been sent.

For a description of how messages within the Wimp environment are generated see Wimp_SendMessage.

Related SWIs

FilerAction_SendSelectedDirectory,
FilerAction_SendSelectedFile

Related vectors

None

* Commands


*Filer_Action

Used to start a Filer_Action task running under the desktop

Syntax

*Filer_Action

Parameters

None

Use

*Filer_Action is used to start a Filer_Action task running under the desktop. The task automatically sets its own slot size to an appropriate value. If it does not receive a 'start operation' message before the next null event, it kills itself.

This command is only useful to programmers writing applications to run under the desktop. To issue the command, you should call Wimp_StartTask with R0 pointing to the string 'Filer_Action'. The reason why this command has to be provided is that it is only possible to start a new Wimp task using a * Command.

If you do try to use this command outside the desktop, the error 'Wimp is currently active' is generated.

Related commands

None

Related SWIs

Wimp_StartTask

Related vectors

None

This edition Copyright © 3QD Developments Ltd 2015
Last Edit: Tue,03 Nov 2015