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

file_indexer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file_indexer

  • 1.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

File Indexer

A simple file indexer that allows you to keep track of all the files in a directory while also extracting information about those files.

What it can do:

  • Keep an index of files in a directory
  • Associate an object with each file, storing e.g. id3-tag data, md5 digests, or anything else that is too costly to recompute over and over.
  • Keep the index synchronized to the file system by using the listen gem.
  • Use a persistent database file to avoid having to rescan the entire database every time the program loads.

Usage:

fi = FileIndexer.new(%w[~/music/], %w[mp3 wav], 'db') do |file|

  # Use a mp3 tag reading library such as taglib-ruby

  { artist: file.artist,
    title:  file.track,
    ...
  }
end

fi.watch

Documentation:

To generate documentation with e.g. yard, simply

cd file_indexer
yard server

FAQs

Package last updated on 03 May 2018

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