#==========================
# 拷贝文件的函数 (by kaien)
#==========================
class File
def copy(from,to)
begin
#读取文件
file = File.open(from,"rb")
fsize = FileTest.size(from)
str = file.read(fsize)
file.close
#输出保存
file1 = File.open(to,"wb")
file1.write(str)
file1.close
rescue
end
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |