File: file_path.rb

package info (click to toggle)
mikutter 4.1.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,260 kB
  • sloc: ruby: 20,126; sh: 183; makefile: 19
file content (14 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-

Plugin.create(:file_path) do

  # Unix local file path
  filter_uri_filter do |uri|
    if uri.is_a?(String) && uri.start_with?('/')
      [Addressable::URI.new(scheme: 'file', path: uri)]
    else
      [uri]
    end
  end

end