GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Six — File Functions (continued)
Overview
The GetVolumeType function retrieves the type of physical or logical device mapped to the drive letter.
Syntax/Parameters
Syntax
int = GetVolumeType ( string volume );
Parameters
volume
A string containing the drive letter. Any characters after the first letter are ignored.
Return Value
Returns an int specifying the type of device or -1 on failure. Use the GetLastError function to retrieve error information. The lower word portion of the error code will contain the Windows SDK drive type code (normally 0 or 1 for unknown device or for no root directory on device).
The return codes are as follows (as defined in the Legato and Windows SDK):
Define | Value | Comment | |||
DRIVE_UNKNOWN | 0 | Function returns as error | |||
DRIVE_NO_ROOT_DIR | 1 | Function returns as error | |||
DRIVE_REMOVABLE | 2 | SD, Thumb Drive, etc... | |||
DRIVE_FIXED | 3 | Local, (typically C drive) | |||
DRIVE_REMOTE | 4 | Network share | |||
DRIVE_CDROM | 5 | CD or DVD drive | |||
DRIVE_RAMDISK | 6 | RAM (memory based) disk |
Remarks
The GetVolumeType function does not test whether the volume actually exists, only that it is mapped. For example, the function will return without error for a CD or DVD drive when the drive is empty. Any data in the volume parameter after the drive letter is ignored.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.