Name
hw_ExLock -- examine a file system object (V5.0)
Synopsis
int ok = hw_ExLock(APTR handle, struct hwos_ExLockStruct *exlock);
Function
This function returns information about a file system object that has been locked using hw_Lock(). The information is written to the struct hwos_ExLockStruct which has to be passed in parameter 2. struct hwos_ExLockStruct looks like this:

 
struct hwos_ExLockStruct
{
    int nStructSize;   // [in]
    STRPTR Name;       // [out]
    int Type;          // [out]
    ULONG Size;        // [out]
    ULONG Flags;       // [out]
};

Here's a description of the individual structure members:

nStructSize:
This must be set by you to sizeof(struct hwos_ExLockStruct) before calling hw_ExLock().

Name:
This is currently always set to NULL. Use hw_NameFromLock() to get the fully-qualified path to this file system object.

Type:
This will be set to one of the following types:

HWEXLOCKTYPE_FILE:
The file system object is a file.

HWEXLOCKTYPE_DIRECTORY:
The file system object is a directory.

Size:
Size of object in bytes if it is a file, otherwise 0.

Flags:
Combination of flags describing the file system object attributes. See File attributes for a list of supported attributes.

This function is thread-safe.

Designer compatibility
Supported since Designer 4.0

Inputs
handle
handle returned by hw_Lock()
exlock
pointer to a struct hwos_ExLockStruct for storing information about the file system object
Results
ok
True on success, False otherwise

Show TOC