[<< wikibooks] Futurebasic/Language/Reference/filesstr fopen
== FILES$(_fOpen...) ==

=== Function ===
✔ Appearance ✔ Standard ✔ Console

=== Syntax ===
fileName$ = FILES$(_fOpen,[typeListString$],¬
  [promptString$], refNumVar%)fileName$ = FILES$(_fOpenPreview,[typeListString$],¬
  [promptString$], refNumVar%)fileName$ = FILES$(_FSSpecOpen,[typeListString$],¬
  [promptString$], fileSpecRecord)fileName$ = FILES$(_FSSpecOpenPreview,[typeListString$],¬
  [promptString$], fileSpecRecord)
gFBUseNavServices = _zTrue|_false

=== Revised ===
February, 2002 (Release 6)

=== Description ===
This function prompts the user to select an existing file. It does this by displaying the standard "Get File" dialog shown below (its appearance may be different on some systems). If the user selects a file, then the file's name is returned in fileName$, and a reference number for the file's directory is returned in refNumVar% (which must be a short integer variable). If the selected file is in a volume's root directory, the refNumVar% will return a volume reference number; otherwise, it will return a working directory reference number. If the user cancels the dialog, then the function returns an empty (zero-length) string, and it sets refNumVar% to zero.
If the global variable gFBUseNavServices is non-zero, FB switches to the more modern Navigation Services dialog. If the one of the FSSpec version of the call is used, gFBUseNavServices is assumed to be _zTrue.
You can limit the types of files that appear in the dialog by specifying up to four file types in typeListString$. For example, is you pass the string "TEXTPICT" in typeListString$, then only files of type "TEXT" and type "PICT" will be available for selection. If typeListString$ is an empty string, or the parameter is omitted, then all file types will be available for selection.