We introduced files to our environment back in May due to it being one of the most asked for features on the site. We knew this will add a new level of complexity, but we felt that it is a very empowering feature. I will not dive into the design and planning process here, but as always we tried to keep it as simple as possible without limiting you.

files

You can add a new file by clicking on the icon. After that you will be warned that this feature will only allow your console to be used for inputs and outputs, which is what most use it for anyway. In most languages, the first file will be the main file and cannot be removed or renamed.

Adding more files is just the same, click on add file and a new file will spawn with a preset name and extension. You can edit the file's name or deleted if you wish by clicking on the icon beside it. If you're renaming your file, make sure you have the right extension for it.

filemanipulation

Two things to note about files:

  1. They can be of any type/extension and you can use them in your code however you'd like.
  2. Files will always be in the same directory, generally you'd access it through the relative path './filename.ext'.

Here's a few examples on files in different languages: