Specifications
Chapter 21264
If you open the file in "write" mode, any existing data in the file is truncated prior to writing
new data. If you open the file in "
append" mode, any data you write is appended to the end
of the file.
Returns
An integer that is the operating system file handle for this file. Returns -1 if the file cannot be
found or it does not exist.
Example
char *dwConfig = "file:///c|/Program Files/Macromedia/Dreamweaver MX/
Configuration/Extensions.txt";
int = fileno;
if(MM_ConfigFileExists(dwConfig))
{
fileno = MM_OpenConfigFile(dwConfig, "read");
}
JSBool MM_GetConfigFileAttributes()
Availability
Dreamweaver MX
Description
Finds the file and returns the attributes of the file. You can set any of the arguments except
fileURL to NULL if you do not need the value.
Arguments
char *fileURL, unsigned long *attrs, unsigned long *filesize,
unsigned long *modtime, unsigned long *createtime
char *fileURL
is a pointer to a string that names the file for which you want the attributes,
which is provided as a file URL (file://). If
fileURL specifies a path in the Dreamweaver MX
Configuration folder, MM_GetConfigFileAttributes() resolves the path before opening the file.
unsigned long *attrs is the address of an integer that contains the returned attribute bits (see
“JSBool MM_SetConfigFileAttributes()” on page 265 for available attributes).
unsigned long *filesize is the address of an integer that, on return, contains the file size
in bytes.
unsigned long *modtime is the address of an integer that, on return, contains the time that the
file was last modified. The time is given as the operating-system time value (same as
DWFile::getModificationDate).
unsigned long *createtime is the address of an integer that, on return, contains the time that
the file was created. The time is given as the operating-system time value (same as
DWFile::getCreationDate).
Returns
JSBool
Returns JS_FALSE if the file does not exist or an error occurs in getting the attributes.