getstack goes into the separate environment where
popd operate and returns the current stack of directories.
Allowing a function to modify an object in the GlobalEnvironment is frowned upon by CRAN (and most programmers), so to maintain a directory stack a separate environment is established by
pushd. Since this environment is not visible at the console level,
getstack allows the user to check on the current status of the stack.
The current directory stack is returned as a vector of strings.
Carl Witthoft firstname.lastname@example.org
1 2 3 4 5 6