how to open the file

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Timofey

how to open the file which is on the path like “D:\hello.txt”

:bust_in_silhouette: Reply From: IvanVoirol

Look there, I think it’s what you’re looking for :

:bust_in_silhouette: Reply From: Zylann

Read the doc:

thanks, it helped. Or you can file for example ‘D:\music.mp3’ put on stream AudioStreamPlayer and play this file? If you need to convert a file to a specific format, how to do it?

Timofey | 2020-09-17 16:47

Playing arbitrary audio files is quite a different question from opening a txt file.

MP3 is not supported by Godot, it can’t read or convert it.
OGG and WAV can be read though. One person posted an answer on how to do it with C#, so hopefully it should be easy to write the same thing in GDScript with a few syntax changes Load wav or ogg file in C# from custom location? - Archive - Godot Forum

Zylann | 2020-09-17 17:56