Category: File IO (Web target only)
Syntax:
fileImportWebResult:String()
None
"" while nothing has happened yet; then, once, the stored file's name - or "*cancelled*" if the user cancelled (or the file was too big for the web file store).
The answer to fileImportWeb. Check it every frame: it gives the result only once, then "" again, so the code that loads the file runs once.
Web target only: on the desktop, programs read and write real files, so they don't need it. See Building for the Web (File System). GUI programs using BGI can use bgiExportFileWeb / bgiImportFileWeb instead, which answer with a BGI event.
Local name:String = fileImportWebResult()
If name = "*cancelled*" Then
status = "No file chosen"
ElseIf name <> "" Then
Local f:Int = fileReadFile(name)
status = "Loaded " & fileReadLine(f)
fileCloseFile(f)
EndIf
See also: fileExportWeb, fileImportWeb, fileImportWebResult
BambooBasic © 2026 Michael Denathorn