Specifications
C-Level Extensibility 265
Example
char dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver MX/
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
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 MX 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
char *fileURL
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 (file://).
unsigned long attrs 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
JSBool
Returns JS_TRUE if there is no error. If the file does not exist or is masked for deletion, the
function returns JS_FALSE.
Example
char *dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver MX/
Configuration/Extensions.txt";
unsigned long attrs;
attrs = (MM_FILEATTR_NORMAL | MM_FILEATTR_RDONLY);
int fileno = 0;
if(MM_SetConfigFileAttrs(dwConfig, attrs))
{
fileno = MM_OpenConfigFile(dwConfig);
}