Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keywordfs

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keywordfs

A filesystem in userspace using pathes and especially directories components as keywordss that could be used to search or locate files

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created
Source

keywordfs

Well, what if directory names were keywords?

Concept

"Being organized in your file systems means that we usually attach semantics to directories. For example, they can be sorted by activities, projects, years and so on... The more it is organized, the more, you have built a hierarchy with directories. It is nice, except, ... you have to go all the way down to the hierarchy in order to find the pieces of information you put in some files...

The idea behind keywordfs is to remount your filesystem so that the names of the directories are keywords. Then you can navigate through them using keywords instead of a full hierarchy. The idea is that you can borrow shortcuts to get the files.

Here is an example in order to understand the idea. Let's suppose that we have this kind of directory hierarchy in a part of your physical file system

|- research
|  |- projects
|  |  |- ResearchProjectA
|  |  |  |- 2020
|  |  |  |- 2021
|  |  |- ResearchProjectB
|  |  |  |- 2021
|  |  |  |- 2022
|- teaching
   |- 2021
   |  |- SubjectA
   |  |- SubjectB
   |- 2022
      |- SubjectB
      |- SubjectC

We have then the following keywords: research,projects,ResearchProjectA,ResearchProjectB,2020,2021,2022,teaching,subjectA,subjectB,subjectC

If, at the root of the mounted virtual filesystem, I type:

  • cd 2020: I will go to research/projects/researchProjectA/2020,
  • cd SubjectC: I will go to teaching/2022/SubjectC,
  • cd 2021/researchProjectB: I will go to research/projects/researchProjectB/2021,
  • cd 2022: well, it will go to teaching/2022 (shortest path in terms of string length and then first in alphabetical order). However, from this point, I will be able to see 5 subdirectories that are research, projects, ResearchProjectB, SubjectB and SubjectC. Basically, it means that I will be able to navigate to related keywords until there is a single entry that matches the keyword combination.

There you have the concept behind keywordfs."

Setup

You will need git and nodeJS or equivalents.

You first have to clone this repository:

$ git clone https://github.com/jydidier/keywordfs.git

Then, you will have to install javascript dependencies:

cd keywordfs
npm install

Dependencies are using a slightly modified version of https://github.com/direktspeed/node-fuse-bindings, needed for more recent systems as well as polyfills for the definition of Set that, in some versions of nodeJS, was missing some of the ECMAScript 6 specifications.

Use

Go into your keywordfs directory and then start it

$ node keywordfs.js <mountpoint> <referencepoint>

Then, you can enjoy it by going to the mountpoint.

For all subdirectories, a symlink named @ is generated that points to the related actual directory.

TODO

Many things are still needed for this proof of concept to work perfectly:

  • robustify many FUSE operations
  • check performance issues that may arise

Keywords

FAQs

Package last updated on 29 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc