Where do I find the FileDialog overwrite file signal

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By alexholly
:warning: Old Version Published before Godot 3 was released.

When I press save I get a AcceptDialog confirmed signal but it opens a new ConfirmationDialog where I have to confirm overwrite file this does not send the same confirmed signal.

:bust_in_silhouette: Reply From: neikeq

This signal is only accessible inside FIleDialog in C++, and I am not sure why would you need to access it.

AcceptDialog emits confirmed when the OK button is pressed (the Save button in this case). FileDialog listens on this signal and checks if the file already exists.
If the file does not exist, FileDialog will emit file_selected( String path ). Otherwise, FileDialog will popup a confirmation dialog and listen on that dialog’s confirmed signal to emit file_selected( String path ).

If the FileDialog mode is set to MODE_OPEN_FILES, then the emitted signal is files_selected( StringArray paths ).

“Otherwise, FileDialog will popup a confirmation dialog and listen on that dialog’s confirmed”
That is the case I have, I wan’t to save a file.
DOKU: MODE_SAVE_FILE = 3 The dialog will warn when a file exists
How can I listen to this signal it is integrated in the FileDialog.

alexholly | 2016-02-23 22:29

The signal emitted is file_selected( String path ). If the file already exists, the signal won’t be emitted until you confirm the dialog.

neikeq | 2016-02-23 22:33