HDFql Reference Manual v2.6.0

6.7.2SHOW USE DIRECTORY

Syntax

SHOW USE DIRECTORY

[post_processing_option]

[output_redirecting_option]

Description

Show (i.e. get) the working directory currently in use.

Parameter(s)

post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).

output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).

Return

The working directory currently in use as an HDFQL_VARCHAR.

Example(s)

# set working directory currently in use to "/" 
USE DIRECTORY /

# show (i.e. get) working directory currently in use (should return "/") 
SHOW USE DIRECTORY

# create a directory named "my_directory" 
CREATE DIRECTORY my_directory

# set working directory currently in use to "my_directory" (more precisely "/my_directory") 
USE DIRECTORY my_directory

# show (i.e. get) working directory currently in use (should return "/my_directory") 
SHOW USE DIRECTORY

# create two directories named "my_subdirectory0" and "my_subdirectory1" (both directories will be created in directory "/my_directory")
CREATE DIRECTORY my_subdirectory0, my_subdirectory1

# set directory currently in use to "my_subdirectory0" (more precisely "/my_directory/my_subdirectory0")
USE DIRECTORY my_subdirectory0

# show (i.e. get) working directory currently in use (should return "/my_directory/my_subdirectory0")
SHOW USE DIRECTORY

# set directory currently in use to "my_subdirectory1" located one level up (more precisely "/my_directory/my_subdirectory1")
USE DIRECTORY ../my_subdirectory1

# show (i.e. get) working directory currently in use (should return "/my_directory/my_subdirectory1")
SHOW USE DIRECTORY

# set directory currently in use two levels up (should return "/") 
USE DIRECTORY ../..

# show (i.e. get) working directory currently in use (should return "/") 
SHOW USE DIRECTORY