$dirpath

$dirpath

Welcome to our Knowledge Base

Documentation | Blog | Demos | Support

< All Topics
Print

$dirpath

Returns information about the currently accessed application directories.

Syntax

$dirpath()

Return Value

Character string.

Comments

$dirpath returns a character string consisting of the names of all currently accessed application directories and their access types (U for update, R for read). Information about each directory is enclosed in semicolons (;). The directory name appears first, followed by the access type in parentheses.
Directories appear in the order that they were accessed; that is, the most recently accessed directories appear first.

Example

access dir1
access dir2 updatev

output $dirpath()

Prints the string; dir2(U);dir1(R);ZIM(U);_$ZimServices(R);_$session$_(U);

let vDirPath = $dirpath()

let vPos = $position($toalpha(vDirPath, -1), ";Dir1(")

if vPos > 0

output "Directory Dir1 is accessed ";

if $substring(vDirPath,vPos+6,1)="U"

output "update."

else

output "read."

endif

else

output "Directory Dir1 is NOT accessed."

endif

Uses $position to test if a particular directory is accessed.

See Also

ACCESS

RELEASE

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

pt_BRPortuguese