Adobe 38040334 - Dreamweaver CS3 User Manual page 364

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Note: If you want to read the file before writing to it, open the file in
close the read handle and open the file again in
Arguments
char *fileURL, char *mode
• The
argument is a pointer to a string that names the file that you are opening, which is provided
char *fileURL
as a file:// URL. If it specifies a path in the Dreamweaver Configuration folder, the
function resolves the path before opening the file.
• The
argument points to a string that specifies how you want to open the file. You can specify
char *mode
"
", "
", or "
read
write
append
function creates it. If you specify "
share. If you specify "
read
If you open the file in "
write
the file in "
" mode, any data you write is appended to the end of the file.
append
Returns
An integer that is the operating system file handle for this file. Returns -1 if the file cannot be found or does not exist.
Example
char *dwConfig = "file:///c|/Program Files/Adobe/Adobe Dreamweaver CS3/
Configuration/Extensions.txt";
int = fileno;
if(MM_ConfigFileExists(dwConfig))
{
fileno = MM_OpenConfigFile(dwConfig, "read");
}
JSBool MM_GetConfigFileAttributes()
Availability
Dreamweaver MX.
Description
This function finds the file and returns the attributes of the file. You can set any of the arguments except
to
if you do not need the value.
null
Arguments
char *fileURL, unsigned long *attrs, unsigned long *filesize,
unsigned long *modtime, unsigned long *createtime
• The
argument is a pointer to a string that names the file for which you want the attributes. You
char *fileURL
must provide this argument as a file:// URL. If
the
MM_GetConfigFileAttributes()
• The
unsigned long *attrs
"JSBool MM_SetConfigFileAttributes()" on page 359 for available attributes).
• The
unsigned long *filesize
in bytes.
"write"
" mode. If you specify "
write
", the
write
MM_OpenConfigFile()
", the
MM_OpenConfigFile()
" mode, any existing data in the file is truncated before writing new data. If you open
fileURL
function resolves the path before opening the file.
argument is the address of an integer that contains the returned attribute bits (see
argument is the address of an integer in which the function returns the file size
mode. When you want to write to the file,
"read"
or
mode.
"append"
" and the file does not exist, the
function opens the file with an exclusive
function opens the file with a nonexclusive share.
specifies a path in the Dreamweaver Configuration folder,
DREAMWEAVER CS3
Extending Dreamweaver
MM_OpenConfigFile()
null
MM_OpenconfigFile()
fileURL
358
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents