Skip to content

Commit

Permalink
update files explorer md
Browse files Browse the repository at this point in the history
  • Loading branch information
ryestew committed Mar 27, 2021
1 parent ae355c7 commit 757767c
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 20 deletions.
59 changes: 39 additions & 20 deletions docs/file_explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,71 @@ To get to the File Explorers module - click the file explorers icon.

![](images/a-file-explorer1.png)

By default Remix IDE **ONLY** stores files in your browser's local storage. It is possible to go beyond this default behavior - see the **Important Note** below.
File Storage
------------
By default, Remix IDE stores files in **Workspaces** which are folders in your **browser's local storage**.

The files explorer's **browser folder** has a sample project in it. The files are stored in your browser's **browser storage**.
**Important Note:** Clearing the browser storage will **permanently delete** all the files stored there.

If you open Remix IDE and you do not see the sample project (like in the image above), they will appear when all the files in the File Explorer are erased or when the cache is cleared.
If you want to use browser storage, but also to save to save a git repo on IPFS, use the **DGIT** plugin.

**Important Note:** Clearing the browser storage will **permanently delete** all the
solidity files stored there. This is an inherent limitation of a browser-based IDE. However, if you want to store files outside of the browser and on your computer's filesystem, use [RemixD](remixd.html) or use the [desktop version of Remix-IDE](https://github.com/ethereum/remix-desktop/releases/). RemixD enables you to have access to a selected folder on your hard drive. Remix Desktop is a version of Remix-IDE in an Electron app. Furthermore you can use the DGIT plugin to save a git repo of your files in IPFS.
If you want to store files on your computer's filesystem, use **[Remixd](remixd.html)** or use the **[desktop version of Remix-IDE](https://github.com/ethereum/remix-desktop/releases/)**. Remixd enables you to have access to a selected folder on your hard drive. Remix Desktop is a version of Remix-IDE in an Electron app.

You can rename, remove or
add new files to the file explorer.
Workspaces
------------
Workspaces are new as of Remix IDE v0.11.0.. Workspaces should help clean up & organize your Files Explorer by allowing you to separate your projects.

The Files Explorer's Workspaces all have a contracts folder, a scripts folder, a tests folder, and a README.txt.

### Migrating your files to Workspaces
If you had files stored in browser storage in versions of Remix before v0.11.0 to get these files, you will need to click on the **Migrate old filesystem to workspace** link the Home Tab. After you click on that, you'll get a modal asking if you want to migrate and download or just migrate the files.

![](images/a-migrate-download-btns2.png)

Also note the **Download all files** link on the left of the Home tab. This link will download all files in your browser's local storage to your downloads folder.

Files Explorer Tour
-------------------

![](images/a-file-explorer-buttons.png)

We will start by reviewing the icons in the image above.

The book icon - **A.** is the link to the module's documentation.
The book icon - **A.** is the link to the documentation (this page).

The icons to the right of the **browser** file explorer in the image above only appear for browser storage.
### Workspace Manipulation
Add a Workspace **B.** <br>
Rename a Workspace **C.** <br>
Delete a Workspace **D.** <br>

Create new File
---------------
## File Manipulation

Click on the new file icon, an input for a new the file’s name will appear in the **Explorer**. Once a name is entered, the new empty file will open in the Editor.
Click on the new file icon (**E.**), an input for a new the file’s name will appear in the **Explorer**. Once a name is entered, the new empty file will open in the Editor.

![](images/a-file-explorer-new-file2.png)

When you click on the new file icon, the new file will be placed in the currently selected folder. If a file and not a folder is selected then the new file will be placed in that file’s folder. And if nothing is selected, then the file will be placed in the root of the browser folder. Or to be brief — just be mindful of what folder it lands in.
When you click on the new file icon, the new file will be placed in the currently selected folder. If a file and not a folder is selected then the new file will be placed in that file’s folder. And if nothing is selected, then the file will be placed in the root of the current workspace's folder. Or to be brief — just be mindful of what folder it lands in.

Create a folder
---------------

The icon marked **C.** above. Creates a new folder in **browser** file explorer.
The icon (marked **F.** above) creates a new folder in the current workspace.

Publish to Gist
---------------

The icon marked **D.** above. Publishes all files from the browser folder to a gist. Only file in the root of **browser** will be published. Files in subfolders will not be publish to the Gist.
Gist API **requires** users to be authenticated to be able to publish a gist.
The icon (marked **G.** above) publishes all files from the current Workspace to a gist. Only file in the root of **browser** will be published. Files in subfolders will not be publish to the Gist.

Gist API **requires** users to be authenticated to be able to publish a gist.

Click [this link](https://github.com/settings/tokens) to Github tokens setup and select Generate new token. Then check the **Create gists** checkbox and generate a new token.
Click [this link](https://github.com/settings/tokens) to Github tokens setup and select Generate new token. Then check the **Create gists** checkbox and generate a new token. Also make sure you check the box to enable the creation of Gists with this token.

Take the token and paste it in Remix's **Settings** module in the **Github Access Token** section. And then click Save. For the moment, after saving, in order for the token to be registered, you will need to refresh Remix. In an upcoming release, it will not be necessary to do the refresh.
Take the token and paste it in Remix's **Settings** module in the **Github Access Token** section. And then click Save. **For the moment**, after saving, in order for the token to be registered, you will need to refresh Remix. In an upcoming release, it will not be necessary to do the refresh.

Upload to Browser Storage
---------------

Click the icon marked **E.** to upload a file from your computer's file system to your browser's local storage.
Click the icon marked **H.** to upload a file from your computer's file system to your browser's local storage.

Right Click on a File
----------------------
Expand All @@ -78,4 +95,6 @@ Right Click on a Script

![](images/a-file-ex-rt-click-script.png)

Right click on any file with a .js extension will give the **run** option in the context menu. The **run** shortcut is equivalent to getting the script file to be the active tab in the editor and then running the command `remix.exeCurrent()` in the console.
Right click on any file with a .js extension get the **Run** option in the context menu to run the script. The **Run** in the context menu is a shortcut. The other way to get a script to run is to:
1. Click on the script to make it the active tab in the editor
2. Input the command `remix.exeCurrent()` in the console.
Binary file modified docs/images/a-file-ex-rt-click-script.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/a-file-ex-rt-click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/a-file-explorer-buttons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/a-file-explorer-new-file2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/a-file-explorer1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/a-migrate-download-btns2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 757767c

Please sign in to comment.