Name
FullPath -- combine directory and file into a path (V2.0)
Synopsis
path$ = FullPath(dir$, file$[, ...])
Library
dos

Function
This function combines dir$ and file$ into a path specification.

Starting with Hollywood 9.0, this function accepts an unlimited number of arguments, allowing you to combine an unlimited number of path constituents into a single path.

Starting with Hollywood 11.0, this function can also be used to compose Storage Access Framework (SAF) or MediaStore URIs on Android. If dir$ specifies such a URI, file$ must point to a file or directory that exists or the function will fail. Also note that if dir$ specifies a SAF or MediaStore URI, you must not call this function with more than two arguments.

On Android dir$ can also be one of these special constants to compose a MediaStore URI:

#MEDIA_DOWNLOADS
The collection of downloaded files in the MediaStore.

#MEDIA_IMAGES
The collection of images in the MediaStore.

#MEDIA_VIDEOS
The collection of videos in the MediaStore.

#MEDIA_MUSIC
The collection of audio files in the MediaStore.

When passing one of these special constants, file$ may contain a single subdirectory which is separated from the actual file using a single slash, e.g. "subdir/file", to refer to a file in a MediaStore subdirectory. Keep in mind, though, that only one nesting level is allowed so there must not be more than one subdirectory in file$. See Working with Android URIs for details.

Inputs
dir$
source directory
file$
source file
...
optional: additional items to be appended to the path (V9.0)
Results
path$
path specification
Example
path$ = FullPath("/home/andreas", "image.jpg")
path$ receives the string "/home/andreas/image.jpg".


path$ = FullPath("/home", "andreas", "image.jpg")
This does the same as the first example but passes three instead of two arguments to FullPath().


path$ = FullPath(#MEDIA_IMAGES, "test.png")
On Android, get the MediaStore URI for the file "test.png" in the device's images collection.

Show TOC