lib/buildmaster/cotta/cotta_dir.rb in BuildMaster-0.9.0 vs lib/buildmaster/cotta/cotta_dir.rb in BuildMaster-0.9.1
- old
+ new
@@ -49,9 +49,19 @@
def delete
list.each {|children| children.delete}
@system.delete_dir(@path)
end
+ def move_to(target)
+ target.parent.mkdirs
+ @system.move_dir(@path, target.path)
+ end
+
+ def copy_to(target)
+ target.parent.mkdirs
+ @system.copy_dir(@path, target.path)
+ end
+
def list
@system.list(@path).collect do |item|
candidate = dir(item)
if (not candidate.exists?)
candidate = file(item)
\ No newline at end of file