ShareFS provides a simple mechanism for accessing files on locally networked RISC OS systems. The system uses Freeway to distribute details of the shared discs. This allows any Freeway reachable system (usually those on the local network, but may include any NetI accessible networks), to access the shared files. Although the objects are known as 'shared discs' they may refer to parts of a filing system. Under Select 1, and later, the Filer menu offers the option to share sub-directories.
In the past the SWI calls for ShareFS have been undocumented. They are presented here to fill in this gap, but may be extended and modified without notice. The flags on the SWIs are inconsistent for legacy reasons.
From ShareFS 3.97 onward, the ShareFS Filer can be disabled by setting the ShareFS$Filer variable to 'no'. The filer can be re-enabled by setting it to any other value.
Controls whether the ShareFS Filer icon is displayed. It can be disabled by setting the ShareFS$Filer variable to 'no'. The filer can be re-enabled by setting it to any other value.
R0 | = | pointer to zero-terminated filing system name ('ShareFS' in our case) |
R1 | = | &801C8 (reason code) |
R2 | = | Share state: 0 if object is unshared, 1 if object is shared |
R3 | = | pointer to zero-terminated directory name being shared |
R4 | = | pointer to zero-terminated name of the shared object |
R5 | = | private data (filesystem specific) |
R0-5 | preserved |
This service is issued when a path is shared or unshared by a filing system. It should not be claimed.
R0 | = |
Flags:
| |||||||||||||||||||||||
R1 | = | Pointer to zero-terminated share name | |||||||||||||||||||||||
R2 | = | Pointer to zero-terminated directory name | |||||||||||||||||||||||
R3 | = | Authentication key number (if bit 5 of the flags is set) |
R0-3 | preserved |
This SWI is used to share a directory.
R0 | = |
Flags (reserved, must be 0) |
R1 | = | Pointer to zero-terminated share name, or directory name |
R0-1 | preserved |
This SWI is used to stop sharing a directory.
R0 | = |
Flags:
| |||||||||||||||||||||||
R4 | = | Opaque value for enumeration, starting from 0 | |||||||||||||||||||||||
R5 | = | Authentication key number (if bit 5 of the flags is set) |
R1 | = | Pointer to zero-terminated disc name |
R2 | = | Pointer to zero-terminated directory name |
R3 | = | Flags used for the share |
R4 | = | New opaque value, or -1 if no more details |
This SWI is used to enumerate the shared discs.
R0 | = |
Flags:
| |||||||||||
R1 | = | Pointer to zero-terminated share name or directory name | |||||||||||
R2 | = | Pointer to buffer for data | |||||||||||
R3 | = | Length of buffer |
R0 | = | Flags for share (see ShareFS_CreateShare) |
R3 | = | Length of data written to buffer, or -ve length if the name would not fit |
This SWI is used to identify a share given its name or directory name.
Offset | Contents | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
R1+20 |
Flags:
| ||||||||||||||||||||||||||
R1+24 | x co-ordinate to open at (if bit 30 set) | ||||||||||||||||||||||||||
R1+28 | y co-ordinate to open at (if bit 30 set) | ||||||||||||||||||||||||||
R1+32 | zero-terminated directory name to share |
This message will cause ShareFS to open a dialogue box showing the share details requests, or the live share details if the directory is already shared.
It should be sent by an application which wishes to present the user with a set of options for sharing a directory. A window will be opened either around the pointer, or at the position requested.
Maintainer(s): | Gerph <gerph@gerph.org> | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
History: |
| ||||||||||||
Related: | http://www.riscos.com/support/developers/riscos6/networking/sharefs.html | ||||||||||||
Disclaimer: |
© Gerph, 2021. |