Gets a lock on a file or directory. There may be more than one shared lock on a file but only one if it is an exclusive one. Locked files or directories may not be deleted.
INPUTS
name
NUL terminated name of the file or directory.
accessMode
One of SHARED_LOCK EXCLUSIVE_LOCK
RESULT
Handle to the file or directory or 0 if the object couldn't be locked. IoErr() gives additional information in that case.
EXAMPLE
SEE ALSO
NOTES
The lock structure returned by this function is different from that of AmigaOS (in fact it is identical to a filehandle). Do not try to read any internal fields.