class Classifile::TargetFile
Class representing the target file
Attributes
atime[RW]
basename[RW]
ctime[RW]
dirname[RW]
extname[RW]
full_path[RW]
pure_basename[RW]
size[RW]
to_path[RW]
Public Class Methods
build_by_file(full_path)
click to toggle source
# File lib/classifile/target_file.rb, line 19 def self.build_by_file(full_path) fs = File.stat(full_path) tf = TargetFile.new(full_path) tf.atime = fs.atime tf.ctime = fs.ctime tf.size = fs.size tf end
new(full_path)
click to toggle source
# File lib/classifile/target_file.rb, line 10 def initialize(full_path) path_name = Pathname.new(full_path) @full_path = full_path @dirname = dirname @basename = path_name.basename(full_path).to_s @pure_basename = path_name.basename(full_path).to_s.split(".")[0] @extname = path_name.extname end