Jsbool mm_setconfigfileattributes(), Jsbool, Mm_setconfigfileattributes() – Adobe Extending Dreamweaver CS4 User Manual
Page 368
362
EXTENDING DREAMWEAVER CS4
C-level extensibility
•
The unsigned long *modtime argument is the address of an integer in which the function returns the time that the
file was last modified. The time is given as the operating-system time value. For more information about the
operating-system time value, see
DWfile.getModificationDate()
in the Dreamweaver API Reference.
•
The unsigned long *createtime argument is the address of an integer in which the function returns the time that the
file was created. The time is given as the operating-system time value. For more information on the operating
system time value, see
DWfile.getCreationDate()
in the Dreamweaver API Reference.
Returns
A Boolean value:
JS_TRUE
indicates success;
JS_FALSE
indicates failure. Returns
JS_FALSE
if the file does not exist or
an error occurs while getting the attributes.
Example
char dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3/
Configuration/Extensions.txt";
unsigned long attrs;
unsigned long filesize;
unsigned long modtime;
unsigned long createtime;
MM_GetConfigAttributes(dwConfig, &attrs, &filesize, &modtime, &createtime);
JSBool MM_SetConfigFileAttributes()
Availability
Dreamweaver MX.
Description
This function sets the attributes that you specify for the file, if they are different from the current attributes.
If the specified file URL is in the Dreamweaver Configuration folder, this function first copies the file to the user
Configuration folder before it sets the attributes. If the attributes are the same as the current file attributes, the file is
not copied.
Arguments
char *fileURL, unsigned long attrs
•
The char *fileURL argument is a pointer to a string that names the file for which you want to set the attributes, which
is provided as a file:// URL.
•
The unsigned long attrs argument specifies the attribute bits to set on the file. You can use a logical
OR
on the
following constants to set the attributes:
MM_FILEATTR_NORMAL
MM_FILEATTR_RDONLY
MM_FILEATTR_HIDDEN
MM_FILEATTR_SYSTEM
MM_FILEATTR_SUBDIR
Returns
A Boolean value:
JS_TRUE
indicates success;
JS_FALSE
indicates failure. Returns
JS_FALSE
if the file does not exist or
is marked for deletion.