lib/slowfat/dir.rb
##
# Return a directory entry for a specific subdirectory within this directory
# @param filename [String] the name of the directory to access
# @return [Dentry] the directory entry object matching the requested subdirectory
Return a directory entry for a specific subdirectory within this directory
Return a directory entry for a specific subdirectory within this directory
def dir_entry(filename)
      @entries.each do |dentry|
        full_dentry_filename = dentry.extension.length > 0 ? "#{dentry.filename}.#{dentry.extension}".downcase : dentry.filename.downcase
        return dentry if dentry.type == :directory and filename.downcase == full_dentry_filename
      end
      nil
    end
def dir_entry ( filename ) @entries . each do | dentry | full_dentry_filename = dentry . extension . length > 0 ? "#{dentry.filename}.#{dentry.extension}" . downcase : dentry . filename . downcase return dentry if dentry . type == :directory and filename . downcase == full_dentry_filename end nil end
Return a directory entry for a specific subdirectory within this directory
Return a directory entry for a specific subdirectory within this directory
the directory entry object matching the requested subdirectory
the directory entry object matching the requested subdirectory
Dentry
filename
the name of the directory to access
the name of the directory to access