Name
SetFSObjAttributes -- set file or directory attributes (V10.0)
Synopsis
int ok = SetFSObjAttributes(STRPTR obj, ULONG attr, struct hwos_StatStruct
             *st, struct hwTagList *tags);
Function
This function must set the specified attributes in the file or directory specified by obj. The attr parameter specifies which attributes to set. This can be a combination of the following flags:

HWSETFSOATTR_FLAGS:
Set file or directory flags.

HWSETFSOATTR_TIME:
Set file or directory datestamp.

HWSETFSOATTR_COMMENT:
Set file or directory comment.

The actual attribute values are passed in the st parameter which is a pointer to a struct hwos_StatStruct. struct hwos_StatStruct looks like this:

 
struct hwos_StatStruct
{
    int Type;                               // [ignored]
    DOSINT64 Size;                          // [ignored]
    ULONG Flags;                            // [in]
    struct hwos_DateStruct Time;            // [in]
    struct hwos_DateStruct LastAccessTime;  // [in]
    struct hwos_DateStruct CreationTime;    // [in]
    STRPTR FullPath;                        // [ignored]
    STRPTR Comment;                         // [in]
    int LinkMode;                           // [ignored]
    STRPTR Container;                       // [ignored]
};

Not all structure members are used by SetFSObjAttributes(). The ones that are marked [ignored] don't have any function in SetFSObjAttributes(). The others are only used if the respective attribute has been set in the attr bitmask (see above). Here is a description of those members:

Flags:
This member contains a combination of flags describing the file system object attributes. See File attributes for a list of supported attributes. You must only handle this if the HWSETFSOATTR_FLAGS attribute has been set (see above).

Time:
This member contains a time stamp indicating when this file system object was last modified. You must only handle this if the HWSETFSOATTR_TIME attribute has been set (see above).

LastAccessTime:
This member contains a time stamp indicating when this file system object was last accessed. You must only handle this if the HWSETFSOATTR_TIME attribute has been set (see above).

CreationTime:
This member contains a time stamp indicating when this file system object was created. You must only handle this if the HWSETFSOATTR_TIME attribute has been set (see above).

Comment:
This member contains the comment for this object in the file system. You must only handle this if the HWSETFSOATTR_COMMENT attribute has been set (see above).

The tags argument will be set to a tag list that can contain the following tags:

HWSETFSOATAG_USERTAGS:
If this is set, pData will point to a struct hwUserTagList containing a list of user tags passed by the Hollywood script. User tags are a way of passing additional information from Hollywood scripts to plugin functions. See User tags for details.

Inputs
obj
filesystem object to use
attr
combination of attributes to set
st
pointer to a struct hwos_StatStruct containing the attribute values
tags
tag list containing further parameters (see above)
Results
ok
True to indicate success, False on failure

Show TOC