How can I create .data folder and see what files are there?

Hi,

I am a bit confused as to how we can create a .data folder and store files there.

I looked at the Sqlite3 example project and got things working, but I feel bad because I don’t fully understand how or why it works. It seems I cannot “add folder” in my backend section, but it still got created? Now I also cannot see which files are there…

Thx,
Koen

This folder seems to be there by default.

Stefan’s correct for remixed projects - it will copy the files including any folders. Folders prefaced with ‘.’ are hidden from the editor. However, in a new project you can create a folder by creating a file in that location e.g. create a temp text file with the name ‘.data/temp.txt’ and that will create the folder which will remain even if you then remove the temp file.

3 Likes

It’s not there by default for me. Here is my first glitch project contents:

glitch_default_project_contents

How do I mkdir .data ?!

There’s a console available from advanced options from the top left project info menu.

However, you can just add a file with .data in the title from the editor too e.g ‘.data/temp.txt’.

1 Like

Am I missing something? I don’t see this option in Advanced Options. All I see are “Import from GitHub,” “Export to GitHub,” “Download Project,” and “Delete This Project.” I tried adding my own .data/sqlite.db file, but it’s no longer visible on returning to my project after leaving.

The console option has moved under the logs panel in the editor. Folders starting ‘.’ are hidden directories, and so don’t show in the filetree.

From the console you can type the command ‘cd .data’ and then ‘ls -a’ to see all files that folder contains.

Hi, I have a question on this theme.

How can I see inside the hidden files? I am doing a survey and I want to see the responses that are on the .data folder

Hey, there- Don’t bump old posts, ESPECIALLY 3 year old ones!
What you need to do is create a .gitignore file, and add a line saying !.data
Worked for me!