system
December 15, 2020, 10:29pm
1
Attention
Topic was automatically imported from the old Question2Answer platform.
Asked By
yatoimtop
I’m trying to write a script that lets godot read a script from an external TXT file, but the filesystem explorer doesn’t recognize it and the code i use to grab it isn’t getting anything it can use. Is there a manual way to make this happen? Or an alternative way to let godot read text files?
i saw that one! i used the code, and it works, but the issue was godot couldn’t even see it at all. i figured it out though, thank you for the help!
yatoimtop | 2020-12-18 03:20
system
December 15, 2020, 11:28pm
2
Reply From:
jgodfrey
It doesn’t look like it’s possible to show TXT
file types (and some others) in the FileSystem panel. Here are a few open, related proposals:
opened 07:46PM - 07 Apr 20 UTC
topic:editor
<!--
Please fill in *all* the questions below and don't remove any of them.
Pr… oposals not following the template below will be closed immediately.
-->
**Describe the project you are working on:**
~~Irrelevant for proposal, but hey it is a top down hide and seek game.~~
**Describe the problem or limitation you are having in your project:**
Files that are not recognized by godot are not shown in FileSystem dock. This is also true for subfolders that contain a `project.godot` file. This can be confusing for new users as the name "FileSystem" suggests that all files from the OS file system are shown.
See this (closed) issue for an example: https://github.com/godotengine/godot/issues/37671
If it is planned to support nested projects then this part would become obsolete, however the issue for unsupported files still exists.
**Describe the feature / enhancement and how it helps to overcome the problem or limitation:**
The ability to show all files will help users to see that godot treats some files as usable and others as unusable.
**Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:**
I see two things that would help to achieve this goal:
_1. Always show all files/directories:_
Directories that can't be accessed would be shown in a different way, see images. If the mouse hovers them a tooltip would explain why the file is inaccessible.
_2. Add a toggle to show all files:_
This would add the ability to decide what is or isn't shown.
I think a combination of both would be the best option. This way users are able to see all files if they want, but they can still hide them if the file tree is too crowded. It could look similar to this mock up:
![tmp](https://user-images.githubusercontent.com/44872771/78712164-7ce85b80-7918-11ea-93b4-34855f7d8788.png)
**If this enhancement will not be used often, can it be worked around with a few lines of script?:**
Not really.
**Is there a reason why this should be core and not an add-on in the asset library?:**
The file system is an elementary part of the engine, it would be nice if it has this ability by default. Also I am not sure if an addon should mess with the internal filesystem dock, probably not a good idea.
*Bugsquad edit (keywords for easier searching): non-resource, nonresource*
opened 06:50PM - 06 Feb 19 UTC
closed 05:28AM - 27 May 20 UTC
feature proposal
archived
discussion
topic:editor
<!-- Please search existing issues for potential duplicates before filing yours:…
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->
**Godot version:**
3.0.6
**OS/device including version:**
Windows 10
**Issue description:**
Can't see .cfg files in the file explorer dock
**Steps to reproduce:**
1. Create a new godot project
2. Make a script that saves a new ConfigFile within the res:// directory
3. Try and look for where you saved in the file explorer dock
Regarding opening / reading a TXT file from code, that should be possible, but without more info, there’s not much else to say.
system
December 18, 2020, 3:18am
3
Reply From:
yatoimtop
Found it! You have to create the file from the godot scripting window’s file/edit/tools bar thing. Then godot will see and recognize it as part of the project!