问题标签 [fileutils]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby-on-rails - Rails 3:Errno::ENOENT 异常
我有如下代码。它在我的本地机器上运行正常
但是在我的远程服务器上,它是一个 CentOS 服务器,它给了我这个
多谢你们!
java - FileUtils.copyUrlToFile 中的错误
我正在执行以下代码以将 .gz 文件从 URL 拉到本地目录。对于小文件,它可以正常运行,但对于大文件,它只下载其中的一部分,但不会失败。只有当我尝试解压缩它时,我才会知道错误。有人可以说明这可能是什么原因。
ruby-on-rails - gem安装fileutils错误
现在我正在尝试使用 Rails 4.0.2 通过 Ruby 语言打开 SVG 文件以从中获取数据,
首先我使用此命令 [ gem install nokogiri
] 安装了“nokogiri”,因为我使用的是 Windows 7
,然后当我尝试使用此命令 [ gem install fileutils
]安装“fileutils”
但我总是收到此错误
Blockquote
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
检查 Ruby 版本 >= 1.8.5... 是
驱动器规格无效。
无法获取 ImageMagick 版本
* extconf.rb 失败 *
由于某种原因无法创建 Makefile,可能缺少
必要的库和/或头文件。
检查 mkmf.log 文件以获取更多
详细信息。
您可能需要配置选项。
为什么我得到这个错误?
java - 使用弹簧数据上传文件 - gridfs
您好我正在尝试使用弹簧数据上传文件。当我尝试上传文件时,出现异常。
我的文件上传代码是
在哪里TEMPORARY_FILES_DIRECTORY = new File("/home/temp/");
我得到的例外是
在调试FileUtils
课上
谁能告诉我这段代码有什么问题。
ruby-on-rails - Rails FileUtils.mkdir_p 只是创建父目录
我在 Rails 中有一个控制器,其操作旨在创建一个新目录。
此操作应创建目录“/public/graph_templates/aaa/test”。然而,它离开了最终目录“test”。为什么这只创建父目录?
文档:http ://ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/FileUtils.html#method-c-mkdir_p
java - Apache Commons FileUtil 工具在相等文件比较时未返回 true
我正在尝试使用 Apache Commons FileUtil 工具比较两个 txt 文件。这是我的代码:
如上所示,这两个文件存在于不同的文件夹中,但它们的内容是相同的。但我仍然没有得到输出为content equal!!!
.
任何帮助将不胜感激!
ruby-on-rails - 在生产 ruby on rails 中删除文件权限被拒绝
我正在努力在生产模式下删除文件。我尝试了几个选项
1) File.delete(文件名)
2) FileUtils.rm_rf(文件名)
当我在开发中运行时,它说在生产模式下权限被拒绝它工作正常。此外,当我在文件存在的文件夹上明确运行 chmod -R 777 时,它可以让我删除文件。我尝试使用 File.chmod 选项,但它不是不工作
java - Java FileUtils:从文件中删除特定行
如何从具有类的文本文件中删除特定行(按索引)org.apache.commons.io.FileUtils
?
要删除的行的索引已经知道他,所以我需要一些从文件中删除特定行的方法。
java - Apache FileUtils when comparing two identical pdfs keeps returning false
I am using FileUtils to compare two identical pdfs. This is the code:
Despite the fact that both pdf files are identical, I keep getting false
. I also noticed that when I execute:
I get the following bytecode for the two pdf files:
So even though both pdf files are absolutely identical visually, their byte-code is different and hence failing the boolean test. Is there any way to test whether the identical pdf files are identical?
ruby - 尝试使用 FileUtils.cp 将文件复制到目标文件夹时出现问题
我已经尝试了对以下行的许多变体,以尝试将位于 file_path 的文件复制到 dest "#{location}/#{customer}/#{version}/"
,但我不断收到错误"#{location}/#{customer}/#{version}/"
是文件夹。
Ruby 1.9.3 文档说如果dest
是一个文件夹,它将复制到dest/src
......所以我在这里不知所措。
文件路径在哪里
并"#{location}/#{customer}/#{version}/"
决定:
我知道我可能正在做一些非常容易修复的事情,但我尝试了很多事情,包括:
谢谢你的帮助!