|
This technical note outlines the steps an application must take to create files
inside AppleShare drop folders.
[Aug 01 1987]
|
AppleShare File Server
The AppleShare File Server allows the creation
of drop folders. These are folders for which the user has the Make
Changes privilege (write access), but not See Files
(read access) or See Folders (search access). For an
application to create a file in such a folder, the following
procedure must be executed in strict order:
- Issue the
Create call to create the new file.
- Issue a
GetCatInfo call (if desired, to preserve the creation date).
- Set the file's creator and type (and creation date if desired), with a
SetCatInfo call.
- Open each fork of the file with an
OpenDeny call with deny readers and deny writers access (an attempt to open with read access will fail). If your application will need to write to both forks of the file, it must open both now.
Write each fork. (Do not try to read, any attempt will fail with a privilege error.)
Close each fork.
This sequence can be followed for creating any file, not just those in drop
folders, so your application can always create files in this manner. There is
no need to special case for drop folders.
Note that you will not be able to do a final SetCatInfo to set the modification
date to a different value. For example, if you were making a copy of an existing file and wanted
the copy to retain the original creation and modification dates, it will not be possible if the
destination is in a drop folder.
References
The File Manager
AppleShare Administrator's Guide
Software Applications in a Shared Environment
Back to top
Downloadables
|
Acrobat version of this Note (52K)
|
Download
|
Back to top
|