Class: FSSM::Pathname

### Home Classes Methods

### In Files

- lib/fssm/pathname.rb

### Parent

Pathname

### Methods

- ::for
- #glob
- #is_virtual?
- #segments

### Class/Module Index

Quicksearch

- FSSM
- FSSM::Backends
- FSSM::Backends::Inotify
- FSSM::Backends::Polling
- FSSM::Backends::RBFSEvent
- FSSM::Monitor
- FSSM::Path
- FSSM::Pathname
- FSSM::State
- FSSM::State::Directory
- FSSM::State::File
- FSSM::Support
- FSSM::Tree
- FSSM::Tree::Cache
- FSSM::Tree::CacheDebug
- FSSM::Tree::Node
- FSSM::Tree::NodeBase
- FSSM::Tree::NodeEnumerable
- FSSM::Tree::NodeInsertion

No matching classes.

# FSSM::Pathname

### Constants

VIRTUAL_REGEX

### Public Class Methods

for(path) click to toggle source

    # File lib/fssm/pathname.rb, line 10
    def for(path)
      path.is_a?(::FSSM::Pathname) ? path : new(path)
    end

### Public Instance Methods

glob(pattern, flags = 0, &block) click to toggle source

    # File lib/fssm/pathname.rb, line 30
    def glob(pattern, flags = 0, &block)
      patterns = [pattern].flatten
      patterns.map! { |p| self.class.glob(to_s + p, flags, &block) }
      patterns.flatten
    end

is_virtual?() click to toggle source

    # File lib/fssm/pathname.rb, line 17
    def is_virtual?
      !!(VIRTUAL_REGEX =~ to_s)
    end

segments() click to toggle source

    # File lib/fssm/pathname.rb, line 21
    def segments
      path  = to_s
      array = path.split(File::SEPARATOR)
      array.delete('')
      array.insert(0, File::SEPARATOR) if path[0, 1] == File::SEPARATOR
      array[0] += File::SEPARATOR if path[0, 3] =~ SEPARATOR_PAT
      array
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.