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

Chapter 5 Manager Overview

On a UNIX system, a slash ( / ) represents the empty absolute path. The slash specifies the root of the file hierarchy. A period ( . ) represents the empty relative path.

On the PC, you represent the empty absolute path as an empty string. It specifies the set of all volumes on the system. A period ( . ) represents the empty relative path.

On the Macintosh, the empty absolute path is represented as an empty string. It specifies the set of all volumes on the system. A colon ( : ) represents the empty relative path.

LabVIEW Path Specification

In LabVIEW, you specify a path using a special LabVIEW data type, represented as Path. The exact structure of the Path data type is private to the file manager. You create and manipulate the Path data type using file manager routines.

A Path is a dynamic data structure. Just as you use memory manager routines to allocate and deallocate handles and pointers, you use file manager routines to create and deallocate Paths. Just as with handles, declaring a Path variable does not actually create a Path. Before you can use the Path to manipulate a file, you must dynamically allocate the Path using file manager routines. When you are finished using the Path variable, you should release the Path using file manager routines.

In addition to providing routines for the creation and elimination of Paths, the file manager provides routines for comparing Paths, duplicating Paths, determining characteristics of Paths, and converting Paths to and from other formats, such as the platform-specific format for the system on which LabVIEW is running.

File Descriptors

When you open a file, LabVIEW returns a file descriptor associated with the file. A file descriptor is a data type LabVIEW uses to identify open files. All operations performed on an open file use the file descriptor to identify the file.

A file descriptor is valid only while the file is open. If you close the file, the file descriptor is no longer associated with the file. If you subsequently open the file, the new file descriptor will most likely be different from the file descriptor LabVIEW used previously.

LabVIEW Code Interface Reference Manual

5-16

© National Instruments Corporation

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