Fileutils has a method ln_sf which forces the creation of a symlink

This commit is contained in:
dmathieu 2009-09-28 22:28:38 +08:00 committed by Chris Wanstrath
parent 5f8fe542a0
commit eb1cde19f9

View File

@ -30,6 +30,12 @@ module FakeFS
raise Errno::EEXIST, path if FileSystem.find(path)
FileSystem.add(path, FakeSymlink.new(target))
end
def ln_sf(target, path)
FileSystem.delete(path)
FileSystem.add(path, FakeSymlink.new(target))
end
def cp(src, dest)
dst_file = FileSystem.find(dest)