Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Labview Code Interface Reference Manual.pdf
Скачиваний:
35
Добавлен:
29.05.2015
Размер:
1 Мб
Скачать
☆

 

Chapter 7 File Manager Functions

Error

Description

mgArgErr

Not a valid file descriptor or size < 0.

fDiskFull

Disk is full.

fNoPerm

Access denied (file exists or something is locked/protected).

fIOErr

Unspecified I/O error occurred.

 

 

 

Flushing File Data to Disk

FFlush

syntax

MgErr

FFlush(fd);

FFlush writes any buffered data for the specified file out to the disk.

 

Parameter

Type

Description

 

fd

File

File descriptor associated with the file.

returns

MgErr, which can contain the errors in the following list.

 

Error

Description

 

 

mgArgErr

Not a valid file descriptor.

 

fIOErr

Unspecified I/O error occurred.

 

 

 

 

Determining File, Directory, and Volume Information

FExists

syntax

int32

FExists(path);

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

Parameter

Type

Description

path

Path

Path of the file or directory about which you want

 

 

information.

returns

int32, which is one of the following values.

Error

Description

 

kFIsFile

Specified item is a file.

National Instruments Corporation

7-13

LabVIEW Code Interface Reference Manual

Chapter 7 File Manager Functions

 

kFIsFolder

Specified item is a directory or folder.

 

kFNotExist

Specified item does not exist.

 

 

 

 

 

FGetAccessRights

 

 

 

syntax

MgErr

FGetAccessRights(path, owner, group,

 

 

permPtr);

 

FGetAccessRights returns access rights information about the specified file or

 

directory.

 

 

 

 

Parameter

Type

Description

 

path

Path

Path of the file or directory about which you want

 

 

 

access rights information.

 

owner

PStr

Address at which FGetAccessRights stores the

 

 

 

owner of the file or directory.

 

group

PStr

Address at which FGetAccessRights stores the

 

 

 

group of the file or directory.

 

permPtr

int32 *

Address at which FGetAccessRights stores the

 

 

 

permissions of the file or directory. See the File

 

 

 

Manager Data Structures section of this chapter for

 

 

 

a description of permissions.

 

 

 

See the Pointers as Parameters section of

 

 

 

Chapter 1, CIN Overview, for more information

 

 

 

about using this parameter.

returns

MgErr, which can contain the errors in the following list.

 

Error

Description

 

 

 

mgArgErr

A bad argument was passed to the function. Verify path.

 

fNotFound

File not found.

 

 

 

fIOErr

Unspecified I/O error occurred.

 

 

 

 

 

FGetInfo

 

 

 

syntax

MgErr

FGetInfo(path, infop);

FGetInfo returns information about the specified file or directory.

Parameter

Type

Description

LabVIEW Code Interface Reference Manual

7-14

National Instruments Corporation

 

 

 

Chapter 7 File Manager Functions

 

path

Path

Path of the file or directory about which you want

 

 

 

information.

 

infop

FInfoPtr

Address where FGetInfo stores information

 

 

 

about the file or directory. If an error occurs, the

 

 

 

information is undefined. See the File Manager

 

 

 

Data Structures section of this chapter for a

 

 

 

description of the FInfoPtr data type.

 

 

 

See also the Pointers as Parameters section of

 

 

 

Chapter 1, CIN Overview, for more information

 

 

 

about using this parameter.

returns

MgErr, which can contain the errors in the following list.

 

Error

Description

 

 

 

mgArgErr

A bad argument was passed to the function. Verify path.

 

fNotFound

File not found.

 

 

 

fIOErr

Unspecified I/O error occurred.

 

 

 

 

 

FGetVolInfo

syntax MgErr FGetVolInfo(path, vinfo);

FGetVolInfo gets a path specification and information for the volume containing the specified file or directory.

Parameter

Type

Description

path

Path

Path of a file or directory contained on the volume

 

 

from which you want to get information. This path

 

 

is overwritten with a path specifying the volume

 

 

containing the specified file or directory. If an error

 

 

occurs, this path is undefined.

vinfo

VInfoRec *

Address at which FGetVolInfo stores the

 

 

information about the volume. If an error occurs, the

 

 

information is undefined. See the File Manager

 

 

Data Structures section of this chapter for a

 

 

description of the VInfoRec data type.

 

 

See the Pointers as Parameters section of

 

 

Chapter 1, CIN Overview, for more information

 

 

about using this parameter.

returns

MgErr, which can contain the errors in the following list.

National Instruments Corporation

7-15

LabVIEW Code Interface Reference Manual

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