Contents of this guide
In this guide, you will learn about links - a mechanism that allows you to create a shortcut that references the original file or folder stored in the other location.
We show you how to add a link to a file stored on the external data store (eNode) or to another file or folder in your workspace. eNode link gives easy access to the file stored on an external data store without the need to copy it to your Workspace. As a result, you can access the file as if you had it in your workspace but the file does not use your Workspace storage space. A workspace link is a shortcut that points to a file or directory within your workspace or in workspace of a user that shared it with you (see more in Sharing files and applications guide). Workspace links make it easier to organize files and folders inside your Workspace.
Links to files stored on the external data store (eNode file links)
You can add files from external data stores to your workspace directly from the Data Search or from the file viewer. Both Data Search and file viewer allow you to add a file as a copy (Add to workspace action) or as a link (Add to workspace as link action). Add to workspace as link creates a link in your workspace that points to the file stored on the external data store. A link gives easy access to the external file without the need to physically copy it to your Workspace. As a result, you can access the file as if you had it in your workspace but the file does not use your Workspace storage space.
Creating an eNode link
An eNode link might be creating either form the Data Search (Figure 1.1) or from any file visualization (Figure 1.2). In the first case the option Add to workspace as link is available within the MORE menu (marked in Figure 1.1), in the second - within the ACTIONS menu (marked in Figure 1.2).
Figure 1.1. Data Search view with options for creating a link to eNode file marked
Figure 1.2. File visualization with options for creating a link to eNode file marked
After choosing the respective action, a popup window will appear, where you will be able to select the directory where the link will be added e.g. the Project-B directory (Figure 1.3)
Figure 1.3. Selecting the directory where the link should be added
After this, the the link is added to the selected directory (e.g. Project-B as selected in the window from Figure 1.3). The link is marked with a special "link icon" - as marked in Figure 1.4. When showing the File information menu for the link in workspace, you will see the information that link points to a file from an external data store (marked in top-right corner of Figure 1.4). You can also see that the link has all the properties of the source file (e.g. the type Catalog, episode LAI CHAU: water reservoir), but that its size is 0B, which means that it does not take up any storage space in your workspace.
Figure 1.4. Workspace view of the created link and File information view
Things to remember when using eNode links
Although an eNode link in your workspace behaves almost the same as a regular workspace file, the fact that you are using a file that is not physically stored in you workspace has the some important implications:
- A link points to the most up-to-date version of the file e.g. when the new events are added to the Catalog, you will not have to download it again - your file link will automatically show all the new events
- This, however, means also that an application run with such link used as an input might give different results in subsequent runs - if the data file being the link target is updated between the application runs.
- There is also a possibility (though unlikely), that the file will be deleted on the external storage - in such case, the link stays in your workspace, but becomes "broken" (see more in section Broken Links). A similar behavior will also be observed if you lose permissions (e.g. due to expiry of one of your affiliations) or if there is a problem with the connection to the external data store (e.g. temporary network problems or unavailability of the eNode), however, in this situation the link will always become valid as soon as the problem (whether with the permissions or the infrastructure) is fixed.
- A link to the file does not add up to the workspace storage space compared to the file added as a copy
- In case of larger files operations on linked files may be slower than in case when the file is locally stored, as a link must first be downloaded from an external eNode. As a result, visualizations and applications that use eNode links may feel slower than those operating on standard files, however, the difference is usually rather small.
A workspace link is a shortcut that points to a file or directory within your workspace or the workspace of a user that shared it with you*. Workspace links make it easier to find and organize files and folders without copying them. You can also think of them as symbolic links in the Linux system or a shortcut in Windows.
- A link to the file can be used just like an original file e.g. it can be used as an input for the compatible applications and visualizations. Links can be used to “store” multiple copies of the same file in different places but still reference one file. These copies remain up to date and do not add up to your workspace storage space, since they always point to the same file.
- A link to the directory gives a reference to manage the content of the original directory. The directory link can be expanded just like the original directory to reveal its content. Everything you do inside the link of the directory is interpreted as if you were doing it inside the original directory. The content of the link to the directory is automatically updated whenever the content of the original directory changes.
* In general, links to the workspace of other users work in the same way as links to your workspace, therefore, this guide will be enough for you to learn how to use and manage them. However, for more details on creating and specific features of links to files shared by other users please see the Sharing files and applications guide.
Creating a Workspace link
To create a workspace link use the workspace item (file or directory) menu and select the Create link action (marked in Figure 2.1). Note, that the action will not be available if the file/directory already is a workspace link, not to create an infinite loop when accessing it. Nevertheless, you can create a workspace link to an item that is a link to an eNode file.
Figure 2.1. Menu used for creating a Workspace link
After this operation you will be presented with a popup window where you will be able to select the directory where the link will be created - e.g. Project-A in Figure 2.2. Note, that the window is the same as in case of creating of eNode links - Figure 1.3.
Figure 2.2. Selecting the directory where the link should be added
After this process, the link to the catalog.mat file was created in the Project-A directory. The link is marked with a special "link icon" - as marked in Figure 2.3. When showing the File information menu for the created link, you will see the information to which file the link points (top of Figure 2.4). You can also see that the link has all the properties of the source file (e.g. the type Catalog and format MAT), but that its size is 0B, which means that it does not take up any storage space in your workspace.
Figure 2.3. Workspace view after creating a link
Figure 2.4. Information about created link
You can repeat the process to create multiple links to the same file. For example, you can use links as shortcuts to the original file in different projects (e.g. Figure 2.5). You can make sure that files are in consistent places without moving or copying the original.
Figure 2.5. Multiple workspace links to the same file
Things to remember when using workspace links
With workspace links you can arrange freely your projects within workspace. However, you have to remember that a link is only a pointer to your file, not a file itself. Therefore, if the file is changed, when accessing the link you will see it updated and you will not be able to access its previous version. The links are also sensitive to changes in the location of the source file - if you move, rename or delete the file or directory to which the link points, the link will break (see the section Broken Links) and you will no longer be able to use it unless the path is restored. Note, also, that if you change the source file type or format (see Managing properties of workspace files), the link will behave the same as the source file, which might affect displaying its contents or using it as input to an application.
Operations on links
For most operations file links can be used in the same way as the source files:
- When you click on the link in the workspace tree file viewer will show the same content as in the case of the source file
- The link can be used as an input for compatible applications in the same way as the source file
- Using the download action will have the same effect as in case of the source file
Some operations work differently on file links than on source files:
- When you use delete, copy, move or rename action for the link, only the link itself is affected. The source file will not be deleted / copied or moved.
As mentioned before, there are several situations when the content of the link cannot be accessed - the link becomes "broken". These are:
- For eNode links:
- The original file is deleted
- You lose permission to access the file (e.g. the affiliation that granted you access to the file expired) or the file permissions have changed (e.g. the owner of the file requested additional restrictions)
- There is a problem with the connection to the external data store - e.g. temporary network problems or unavailability of the external data store server. However, in this case, the link should become broken only for very short period of time
For workspace links:
- The original file was deleted, renamed or moved
- In case the link points to a shared file or directory: you lose permission to the original file
A broken link has a specific marking in the workspace tree - the link icon is displayed on a red background (see Figure 3.1) and when showing its file information (Figure 3.2), there is a message that the original file is available. The file properties also show the UNDEFINED type of the file (as the real type cannot be determined without the source file).
It is important to know, that in some cases a broken link can be fixed - as soon as the cause of the unavailability of the original file is resolved, a broken link becomes a working link again. In case of an eNode link this usually requires administrative actions on the data store servers, but if the cause of breaking the link was losing permissions to the source file, you might extend your affiliation or apply for a newly required one (if your request it legitimate). In case of a workspace link, restoring the original file to the previous name or location will fix the link. Remember also that the links are very light and inexpensive files, therefore, you can always create new ones.
Figure 3.1. Broken link within the workspace tree
Figure 3.2. File information details of a broken link