Maptitude GISDK Help

FileCheckUsage()

Summary

Checks whether files are in use by Maptitude.

 

Syntax

result = FileCheckUsage(array file_names, string type)

 

Argument

Contents

file_names

An array of strings containing the names of files

type

The file type; if type is null all types are checked

 

Type

Description

CDF

Checks only against files that are part of a .CDF that is open in the session, such as .CDF, .CDX, and .STY

DBD

Checks only against files that are part of a .DBD that is open in the session, such as .DBD, .R0, .PTS, and .STY

SET

Checks only against files that could be used by a set; when sets are large, the index becomes file-based

 

In addition, any table type may be used to check against dataviews of that type. For a list of table types, see OpenTable().

 

Returns

A string containing "True" or "False" as appropriate.

 

Notes

Example

on escape do Return(false) end

    openfile:

    fname = ChooseFileName(d_exts_table, "Save Table As", {{"Replace Warning", "False"}})

    if FileCheckUsage({fname},) then do

        ShowMessage("File already in use.  Please choose again.")

        goto openfile

        end

    on escape default

 

See Also

Function

Summary

ChooseFile()

Gets the name of an existing file using the Windows File Open dialog box

GetDirectoryInfo()

Gets a listing of the contents of a directory

GetFileInfo()

Gets information about a file

SearchFilePath()

Searches for the path for a filename

 

 

©2025 Caliper Corporation www.caliper.com