Skip to content

CheerpJ filesystem tutorial #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

theodoravraimakis
Copy link
Contributor

Filesystem tutorial


To follow this tutorial, you'll need:

- [Download the template project](/docs/cheerpj3/tutorials/CheerpJFilesystemTutorial.zip) and unzip it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not in general very convinced about shipping templates, but if we have to do so please use repos. Keeping zips updated is expensive in the long run.

@alexp-sssup
Copy link
Member

In terms of which repo to use we should try to avoid making many new ones, already too many require manual synchronization alerady. Let's put everything in cheerpj-meta


CheerpJ's virtual filesystem has several key mounting points that behave differently:

- **`/files/`**: This is a **temporary, in-memory filesystem**. Files written here are accessible by your Java application but are not persistent across sessions or page reloads. This is useful for temporary files or data generated during a single user session that needs to be downloaded.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong, the /files mounting point is persistent and will only be cleared if the user clears out indexdb manually. Our own docs explain it -> https://cheerpj.com/docs/guides/File-System-support#files-mount-point

Copy link
Member

@epanholz epanholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in slack, let's shorten the code examples a bit for now and add a single example later on. Left some notes regarding the content.

Copy link
Contributor

@GabrielaReyna GabrielaReyna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi guys, I think there is a bit of confusion on where this piece of information should go.

First, let me clarify the difference between a guide and a tutorial under the framework we are using:

  • Guides: Explain an element of the functionality of the technology, with different small generic examples.
  • Tutorial: beginning to end, step by step small use-case project with a tangible result.

It seems to me that the best place to add this info is as an extension of the existing Files and Filesystem guide.

@epanholz
Copy link
Member

@GabrielaReyna I agree that this content makes more sense as a guide, but I think it should be it's own guide. The existing one mostly explains the architecture and briefly mentions some APIs that can be used to interact with the virtual file system. We could rename the existing guide to Files and Filesystem Architecture and call this one Files and Filesystem Usage Guide. Otherwise I am afraid we might create one very large docs page that is hard to follow. How does that sound?

@GabrielaReyna
Copy link
Contributor

Good point Elisabeth, let's do the following:

Filesystem tutorial
@theodoravraimakis
Copy link
Contributor Author

Hi, I have updated the files as per your last comments @epanholz @GabrielaReyna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants