User Guide
File Access and Multiuser Configuration API 369
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 it is marked for deletion.
Example
char *dwConfig = "file:///c|/
Program Files/Macromedia/Dreamweaver/
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);
}
JSBool MM_CreateConfigFolder()
Availability
Dreamweaver MX.
Description
This function creates a folder in the specified location.
If the
fileURL argument specifies a folder within the Dreamweaver Configuration folder, the
function creates the folder in the user Configuration folder. If
fileURL does not specify a folder
in the Dreamweaver Configuration folder, the function creates the specified folder, including all
higher-level folders in the path if they do not already exist.