R中截断的文件大小限制 [英] Limit of file size for truncate in R
问题描述
来自?truncate
:
truncate
会在当前位置截断为写入而打开的文件.它仅适用于file
连接,并非在所有平台上都实现:在其他平台(包括Windows)上,它不适用于大型(> 2Gb)文件.
truncate
truncates a file opened for writing at its current position. It works only forfile
connections, and is not implemented on all platforms: on others (including Windows) it will not work for large (> 2Gb) files.
在Windows上2Gb限制的原因是什么?是64位Windows,还是文件系统是NTFS,这有关系吗? Windows版本是否重要(XP,7、8、10)?
What is the cause of the 2Gb limit on Windows? Does it matter if it's 64bit Windows, or the file system is NTFS? Does the version of Windows matter (XP, 7, 8, 10)?
在类似Windows的Unix系统上,是否有内置的R函数或某些R包中的函数在Windows上实现与truncate
相同的效果?
Is there a built-in R function or a function in some R package that achieves the same effect on Windows as truncate
on Unix-like systems?
推荐答案
- 根据源 a>,基础
ftruncate
系统调用的缺少的64位版本.似乎可以/将通过更新用于构建R的MinGW来解决此问题. - 不.
- 不.
- Win32 API称为
SetEndOfFile
和在GitHub上搜索CRAN软件包找到了8个匹配项.祝你好运:-)
- According to the source, a missing 64-bit version of the underlying
ftruncate
system call. It seems that this issue can/will be resolved when the MinGW used to build R is updated. - No.
- No.
- The Win32 API is called
SetEndOfFile
, and a GitHub search for CRAN packages found eight hits. Good luck :-)
这篇关于R中截断的文件大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!