Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Using External Code in LabVIEW.pdf
Скачиваний:
49
Добавлен:
29.05.2015
Размер:
1.85 Mб
Скачать

Chapter 6 Function Descriptions

FEmptyPath

Path FEmptyPath(p);

Purpose

Makes an empty absolute path, which is not the same as disposing the path.

Parameters

Name

Type

Description

 

 

 

 

 

 

p

Path

Path allocated by FEmptyPath. If NULL,

 

 

FEmptyPath allocates a new path and

 

 

returns the value. If p is a path, FEmptyPath

 

 

sets the existing path to an empty path and

 

 

returns the new p.

 

 

 

Return Value

The resulting path; if p was not NULL, the return value is the same empty absolute path as p. If an error occurs, this function returns NULL.

© National Instruments Corporation

6-63

Using External Code in LabVIEW

Chapter 6 Function Descriptions

FExists

int32 FExists(path);

Purpose

Returns information about the specified file or directory. It returns less information than FGetInfo, but it is much quicker on most platforms.

Parameters

Name

Type

Description

 

 

 

 

 

 

path

Path

Path of the file or directory about which you

 

 

want information.

 

 

 

Return Value

int32, which can contain the following values:

kFIsFile

Specified item is a file.

kFIsFolder

Specified item is a directory or folder.

kFNotExist

Specified item does not exist.

Using External Code in LabVIEW

6-64

www.ni.com

Chapter 6 Function Descriptions

FFlattenPath

int32 FFlattenPath(p, fp);

Purpose

Converts a path into a flat form that you can use to write the path as information to a file. This function stores the resulting flat path in a pre-allocated buffer and returns the number of bytes.

To determine the size needed for the flattened path, pass NULL for fp. The function returns the necessary size without writing anything into the location pointed to by fp.

Parameters

Name

Type

Description

 

 

 

 

 

 

path

Path

Path you want to flatten.

 

 

 

fp

UPtr

Address in which FFlattenPath stores the

 

 

resulting flattened path. If NULL,

 

 

FFlattenPath does not write anything to

 

 

this address, but does return the size that the

 

 

flattened path would require. Refer to the

 

 

Pointers as Parameters section in Chapter 3,

 

 

CINs, for more information about using this

 

 

parameter.

 

 

 

Return Value

int32, indicating the number of bytes required to store the flattened path.

© National Instruments Corporation

6-65

Using External Code in LabVIEW

Chapter 6 Function Descriptions

FFlush

MgErr FFlush(fd);

Purpose

Writes any buffered data for the specified file out to the disk.

Parameters

Name

Type

Description

 

 

 

 

 

 

fd

File

File descriptor associated with the file.

 

 

 

Return Value

mgErr, which can contain the following errors:

mgArgErr

Not a valid file descriptor.

fIOErr

Unspecified I/O error.

Using External Code in LabVIEW

6-66

www.ni.com

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]