Functions | |
int | mdlFile_create (BeFileNameP outname, WCharCP inname, WCharCP envvar, WCharCP iext) |
Gets the full file path for a file that an application may then want to create. More... | |
int | mdlFile_find (BeFileNameP outname, WCharCP inname, WCharCP envvar, WCharCP iext, FINDFILE_Options options=FINDFILEOPTION_Default) |
Finds the full path for an existing file. More... | |
int | mdlFile_findFiles (FindFileInfo **out, int *nFiles, WCharCP spec, int attributeFilter) |
Collects information on files matching the specifications provided. More... | |
int | mdlFile_getDrive (int *drive) |
Returns the current default drive number. More... | |
int | mdlFile_getFileAttributes (int *attributes, WCharCP fileName) |
Gets the attributes of the specified file. More... | |
int | mdlFile_setDefaultShare (int shareFlag) |
Sets a file sharing mode used by fopen when opening a file for the MDL task. More... | |
int | mdlFile_setDrive (int *logicalDrives, int drive) |
Establishes a new default drive for file system operations. More... | |
bool | mdlFile_isSameFile (WCharCP fileName1, WCharCP fileName2, DgnPlatform::FileCompareMask compareMask) |
Check if two fully qualified file-names represent the same physical file. More... | |
int | mdlFile_mkdir (WCharCP dirPath) |
Creates the new directory specified. More... | |
bool | mdlFile_isUntitledDesign (WCharCP dgnFileName) |
Determines whether the file name represents an untitled file. More... | |
bool | mdlFile_validDesignFile (bool *pThreeD, DgnPlatform::DgnFileFormatType *pFormat, int *pMajorVersion, int *pMinorVersion, byte **ppThumbnail, int *pThumbnailSize, WCharCP pFileName) |
Tests whether the specified file is a valid MicroStation design file. More... | |
int | mdlFile_copy (WCharCP destinationFile, WCharCP sourceFile) |
Copies a file. More... | |
BeFileNameStatus | mdlFile_delete (WCharCP filePath) |
Deletes/removes a file. More... | |
bool | mdlFile_isValidDrive (WCharCP drive) |
Checks to see if a drive is valid. More... | |
int | mdlFile_getDiskFree (UInt64 *space, int drive) |
Gets the number of free bytes on a file system. More... | |
int | mdlFile_createDeprecated (WCharP outname, WCharCP inname, WCharCP envvar, WCharCP iext) |
Gets the full file path for a file that an application may then want to create. More... | |
int | mdlFile_findDeprecated (WCharP outname, WCharCP inname, WCharCP envvar, WCharCP iext) |
Finds the full path for an existing file. More... | |
int | mdlFile_findExtDeprecated (WCharP outname, WCharCP inname, WCharCP envvar, WCharCP iext, FINDFILE_Options options) |
Finds the full path for an existing file. More... | |
int mdlFile_copy | ( | WCharCP | destinationFile, |
WCharCP | sourceFile | ||
) |
Copies a file.
[in] | destinationFile | name of destination file |
[in] | sourceFile | name of source file |
int mdlFile_create | ( | BeFileNameP | outname, |
WCharCP | inname, | ||
WCharCP | envvar, | ||
WCharCP | iext | ||
) |
Gets the full file path for a file that an application may then want to create.
The file path is based on the names provided in inname, envvar and iext. outname. If a file with that name exists before the call, the file is deleted. This method is preferred over the variant with a WCharP output as it can accomodate arbitrary sized file names.
[out] | outname | a BeFileName object buffer to receive the full filename. outnameP can be NULL if mdlFile_find is being used to check to see whether such a file can be created. |
[in] | inname | a filename that has a format a user would enter. It can contain a logical filename and a path. It can contain an extension. The information in innameP is used first to find the file. |
[in] | envvar | usually provides the name of an environment variable. The information in the environment variable generally provides a list of paths to examine when searching for the file. It can be NULL. |
[in] | iext | usually provides a file extension (example .dgn). ext can be NULL. |
int mdlFile_createDeprecated | ( | WCharP | outname, |
WCharCP | inname, | ||
WCharCP | envvar, | ||
WCharCP | iext | ||
) |
Gets the full file path for a file that an application may then want to create.
The file path is based on the names provided in inname, envvar and iext. outname. If a file with that name exists before the call, the file is deleted. This BeFileName variant below is preferred as it can accept arbitrarily large file names.
[out] | outname | a buffer to receive the full filename. The size of the buffer must be at least MAXFILELENGTH bytes. outnameP can be NULL if mdlFile_find is being used to check to see whether such a file can be created. |
[in] | inname | a filename that has a format a user would enter. It can contain a logical filename and a path. It can contain an extension. The information in innameP is used first to find the file. |
[in] | envvar | usually provides the name of an environment variable. The information in the environment variable generally provides a list of paths to examine when searching for the file. It can be NULL. |
[in] | iext | usually provides a file extension (example .dgn). ext can be NULL. |
BeFileNameStatus mdlFile_delete | ( | WCharCP | filePath | ) |
Deletes/removes a file.
[in] | filePath | name of file |
int mdlFile_find | ( | BeFileNameP | outname, |
WCharCP | inname, | ||
WCharCP | envvar, | ||
WCharCP | iext, | ||
FINDFILE_Options | options = FINDFILEOPTION_Default |
||
) |
Finds the full path for an existing file.
The file path is based on the names provided in inname, envvar, and iext.
[out] | outname | points BeFileName to recieve the file name |
[in] | inname | a filename that has a format a user would enter. It can contain a logical filename and a path. It can contain an extension. The information in inname is used first to find the file. |
[in] | envvar | usually provides the name of an environment variable. The information in the environment variable generally provides a list of paths to examine when searching for the file. It can be NULL. |
[in] | iext | usually provides a file extension (example .dgn). ext can be NULL. |
[in] | options | An OR of the options in FDFILE_Options. See Remarks below. |
int mdlFile_findDeprecated | ( | WCharP | outname, |
WCharCP | inname, | ||
WCharCP | envvar, | ||
WCharCP | iext | ||
) |
Finds the full path for an existing file.
The file path is based on the names provided in inname, envvar, and iext.
[out] | outname | points to a buffer to receive the full filename. The size of the buffer must be at least MAXFILELENGTH bytes. outname can be NULL if mdlFile_find is being used to check for the existence of a file. |
[in] | inname | a filename that has a format a user would enter. It can contain a logical filename and a path. It can contain an extension. The information in inname is used first to find the file. |
[in] | envvar | usually provides the name of an environment variable. The information in the environment variable generally provides a list of paths to examine when searching for the file. It can be NULL. |
[in] | iext | usually provides a file extension (example .dgn). ext can be NULL. |
int mdlFile_findExtDeprecated | ( | WCharP | outname, |
WCharCP | inname, | ||
WCharCP | envvar, | ||
WCharCP | iext, | ||
FINDFILE_Options | options | ||
) |
Finds the full path for an existing file.
The file path is based on the names provided in inname, envvar, and iext.
[out] | outname | points to a buffer to receive the full filename. The size of the buffer must be at least MAXFILELENGTH bytes. outname can be NULL if mdlFile_find is being used to check for the existence of a file. |
[in] | inname | a filename that has a format a user would enter. It can contain a logical filename and a path. It can contain an extension. The information in inname is used first to find the file. |
[in] | envvar | usually provides the name of an environment variable. The information in the environment variable generally provides a list of paths to examine when searching for the file. It can be NULL. |
[in] | iext | usually provides a file extension (example .dgn). ext can be NULL. |
[in] | options | An OR of the options in FDFILE_Options. See Remarks below. |
int mdlFile_findFiles | ( | FindFileInfo ** | out, |
int * | nFiles, | ||
WCharCP | spec, | ||
int | attributeFilter | ||
) |
Collects information on files matching the specifications provided.
Information on files and directories can be obtained.
[out] | out | pointer to an array of FindFileInfo structures. |
[out] | nFiles | pointer to the count of the number of entries in the array of FindFileInfo structures. |
[in] | spec | file specification for the requested files or directories. It is an expression that consists of any combination of constant characters and the special wild card characters ? and *. The wild card characters are expanded by mdlFile_findFiles exactly as the operating system expands these pattern-matching characters in interactive key-ins. The wild card character ? matches any single character and the wild card character * matches any sequence of characters. |
[in] | attributeFilter | is set to any of the following constants, which can be combined with the bitwise OR operator "|":
|
int mdlFile_getDiskFree | ( | UInt64 * | space, |
int | drive | ||
) |
Gets the number of free bytes on a file system.
[out] | space | the number of free bytes available on fileSystem. |
[in] | drive | the file system to examine for free storage. 0 means the "current" drive, 1 means A:, 2 means B:, etc. |
int mdlFile_getDrive | ( | int * | drive | ) |
Returns the current default drive number.
[out] | drive | the default drive. It is an integer corresponding to the drive number, where drive A: is 1, drive B: is 2, and so on. |
int mdlFile_getFileAttributes | ( | int * | attributes, |
WCharCP | fileName | ||
) |
Gets the attributes of the specified file.
[out] | attributes | attributes of file or directory |
[in] | fileName | points to a string specifying either a complete directory path or complete file name specification. |
bool mdlFile_isSameFile | ( | WCharCP | fileName1, |
WCharCP | fileName2, | ||
DgnPlatform::FileCompareMask | compareMask | ||
) |
Check if two fully qualified file-names represent the same physical file.
[in] | fileName1 | fully qualified name of first file |
[in] | fileName2 | fully qualified name of second file |
[in] | compareMask | mask which controls degree of comparison |
FileCompareMask::BaseNameAndExtension
FileCompareMask::FileStat
FileCompareMask::All
bool mdlFile_isUntitledDesign | ( | WCharCP | dgnFileName | ) |
Determines whether the file name represents an untitled file.
[in] | dgnFileName | the file name to check. |
bool mdlFile_isValidDrive | ( | WCharCP | drive | ) |
Checks to see if a drive is valid.
[in] | drive | specifies a drive and must be terminated by a path separator. |
int mdlFile_mkdir | ( | WCharCP | dirPath | ) |
Creates the new directory specified.
Unlike the standard C function mkdir, mdlFile_mkdir creates the path to the resulting directory if it doesn't already exist.
[in] | dirPath | directory path |
int mdlFile_setDefaultShare | ( | int | shareFlag | ) |
Sets a file sharing mode used by fopen when opening a file for the MDL task.
[in] | shareFlag | may be MDL_SHARE_COMPATIBILITY, MDL_SHARE_DENY_READ_WRITE, MDL_SHARE_DENY_WRITE, MDL_SHARE_DENY_READ or MDL_SHARE_DENY_NONE. By default, MDL_SHARE_DENY_NONE is used. |
int mdlFile_setDrive | ( | int * | logicalDrives, |
int | drive | ||
) |
Establishes a new default drive for file system operations.
Performing an mdlFile_setDrive has the same effect as interactively changing the default drive with a drive letter key-in such as A:.
[out] | logicalDrives | receives the number of logical DOS drives in the system. The DOS CONFIG.SYS parameter LASTDRIVE controls this value. The logical drives begin with drive letter A: and continue consecutively through the alphabet up to the LASTDRIVE value. For example, if logicalDrivesP is 10, the system contains drive devices A: through J:. |
[in] | drive | specifies the new default drive. It is an integer corresponding to the drive number. Drive A: is 1, drive B: is 2, and so on. |
bool mdlFile_validDesignFile | ( | bool * | pThreeD, |
DgnPlatform::DgnFileFormatType * | pFormat, | ||
int * | pMajorVersion, | ||
int * | pMinorVersion, | ||
byte ** | ppThumbnail, | ||
int * | pThumbnailSize, | ||
WCharCP | pFileName | ||
) |
Tests whether the specified file is a valid MicroStation design file.
[out] | pThreeD | indicates whether the file is a three-dimensional design file. |
[out] | pFormat | an integer value indicating the format of the specified file is stored. Possible values are DgnFileFormatType::V7 for MicroStation/J format, DgnFileFormatType::V8 for the MicroStation V8 format, DgnFileFormatType::DWG for Autocad dwg format, and DgnFileFormatType::DXF for Autocad dxf format. |
[out] | pMajorVersion | indicates the major version of the design file. |
[out] | pMinorVersion | indicates the minor version of the design file. |
[out] | ppThumbnail | set to point to the thumbnail image of the design file, used in the preview pane in the MicroStation Manager window. The image data is a BITMAPINFO structure. |
[out] | pThumbnailSize | indicates the size of the thumbnail image buffer. |
[in] | pFileName | the fully qualified path to the design file. |