![]() |
<< Index >> |
FutureBasic 5 |
files$( deprecated in 5.7.100 - recommend OSPanelOpen/OSPaneSave )
|
function | |
|
fileName$ = files$( {_CFURLRefOpen | _URLOpen}, [typeListPascalString], [promptPascalString], [@]cfURLRefVar )
folderName $ = files$( {_CFURLRefFolder | _URLFolder}, [typeListPascalString], [promptPascalString], [@]cfURLRefVar )
fileName$ = files$( {_CFURLRefSave | _URLSave}, [typeListPascalString], [promptPascalString], [@]cfURLRefVar )
fileName$ = files$( _FSSpecOpen, [typeListPascalString], [promptPascalString], [@]fSpecVar )
fileName$ = files$( _FSRefOpen, [typeListPascalString], [promptPascalString], [@]fsRefVar )
folderName$ = files$( _FSSpecFolder, [typeListPascalString], [promptPascalString], [@]fSpecVar )
folderName$ = files$( _FSRefFolder, [typeListPascalString], [promptPascalString], [@]fsRefVar )
fileName$ = files$( _FSSpecSave, [typeListPascalString], [promptPascalString], [@]fSpecVar )
fileName$ = files$( _FSRefSave, [typeListPascalString], [promptPascalString], [@]fsRefVar )
fileType$ = files$
      note: Apple moved away from file types long ago and aren't recommended.files$
prompts the user via standard Navigation Services dialogs to select an existing file and/or existing folder (and provide a name if the save option is used). If the user selects a file/folder, then the file's name is returned in fileName$, and a reference to the file (as a CFURLRef) is returned for the programmer's use. If the user cancels the dialog, then the function returns an empty (zero-length) string and the reference does not contain a valid value.files$( open )
function, as a 4-character string. In some cases this will not return a value: If the user clicked "cancel" in response to the last File Open dialog, or if the files$( open )
function has never yet been executed or the file doesn't have a file type (which is common for modern MacOS X files), then the files$
function returns an empty (zero-length) string. In some cases it's useful to express the file type as a 4-byte long integer rather than as a string. Use the mki$ function and the cvi function to convert between these two forms. Apple has recommended use of Uniform Type Identifiers to replace Type/Creator. See Apple's "Introduction to Uniform Type Identifiers" for more information.files$
option 1 to select a file does not actually open the selected file. Use the open
statement if you need to open the file.