lib/future/metadata/mime_info.rb
# check if we are dealing with a special node
check if we are dealing with a special node
check if we are dealing with a special node
def special_node_type(filename)
    stat = File.stat(filename)
    case
    when stat.blockdev?
      "inode/blockdevice"
    when stat.chardev?
      "inode/chardevice"
    when stat.directory?
      "inode/directory"
    when stat.pipe?
      "inode/fifo"
    when stat.socket?
      "inode/socket"
    when stat.symlink?
      "inode/symlink"
    when (not stat.file?)
      "inode/door"
    else
      nil
    end
  rescue IOError, SystemCallError
    type_for_name(filename)
  end
def special_node_type ( filename ) stat = File . stat ( filename ) case when stat . blockdev? "inode/blockdevice" when stat . chardev? "inode/chardevice" when stat . directory? "inode/directory" when stat . pipe? "inode/fifo" when stat . socket? "inode/socket" when stat . symlink? "inode/symlink" when ( not stat . file? ) "inode/door" else nil end rescue IOError , SystemCallError type_for_name ( filename ) end
check if we are dealing with a special node
check if we are dealing with a special node
filename
<not_specific>