Get System Directory function

From LabVIEW Wiki
Jump to: navigation, search
Object information
Owning palette(s) File Constants palette
Type VI
Requires Basic Development Environment
Icon File Constants Palette - Get System Directory.png

Get System Directory VI returns the system directory specified in the system directory type input.

This VI returns the system directory of the current target, including My Computer.

(Real-Time Module) You cannot use this VI in VIs that run on RT targets.

Usage

Data Type Name Description
I32.png system directory type system directory type specifies the type of directory you want LabVIEW to retrieve.
0 User Home—Directory that contains the personal files of the current user. This directory is a readable and writable directory accessible to a single user of the system.
1 User Desktop—Directory that contains files located on the desktop of the current user. This directory is a readable and writable directory accessible to a single user of the system.
2 User Documents—Default directory for saving the documents of the current user. This directory is a readable and writable directory accessible to a single user of the system.
3 User Application Data—Directory that contains data for the system applications of the current user. This directory is a readable and writable directory accessible to a single user of the system.
4 User Preferences—Directory that contains the preferences for the current user. This directory is a readable and writable directory accessible to a single user of the system.
5 User Temporary—Directory that holds temporary files for the current user. This directory is a readable and writable directory accessible to a single user of the system. You cannot change the path to this temporary directory.
6 Public Documents—Directory that contains documents accessible to all users of the system. This directory is readable and sometimes writable.
7 Public Application Data—Directory that contains data for system applications accessible to all users of the system. This directory is readable and sometimes writable.
8 Public Preferences—Directory that contains preferences common to all users of the system. This directory is readable and sometimes writable.
9 System Core Libraries—Directory that contains the libraries that come with the operating system. This directory is typically read-only to the standard user of the system.
10 System Installed Libraries—Directory that contains libraries a user installs on the system. This directory is typically read-only to the standard user of the system.
11 Application Files—Directory that contains files of applications installed on the system. This directory is typically read-only to the standard user of the system.
12 Boot Volume Root—Top-level directory used to start the system. This directory is typically read-only to the standard user of the system.
13 Public Cache—Directory that stores files the MathScript RT Module installs and shares among all users for the purpose of making certain operations faster. This directory is readable and sometimes writable.
Boolean.png create directory if not found? create directory if not found? specifies whether the VI creates a new directory if the specified directory does not exist. If FALSE (default), the VI returns the path where the system expects to find the directory. If TRUE, LabVIEW creates a new directory.
Path Indicator.png system directory system directory returns the specified system directory of the current target.

If errors occur while accessing or creating a directory, or the current target does not support the specified system directory type, the VI returns Not a Path.

History

Version Change(s)
LabVIEW 2018 More info to come.

See Also

External Links