directory.getFiles的返回 [英] returnings of directory.getFiles

查看:106
本文介绍了directory.getFiles的返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我在一个项目中工作,该项目从选定目录中收集文件并将文件内容放入SQL Server.此时,我想知道directory.getfiles方法是否可以处理目录中的400.000个文件.我能否获得400.000个文件的directroy.getfiles方法的返回值并将返回值存储到字符串变量中.

使用默认设置是否会导致溢出错误,或者我该如何处理这种情况?

在此先感谢.

Hello,
i work on a project that collecting files from a selected directory and placing the content of files into an SQL server. At this point i wonder whether directory.getfiles method can handle 400.000 files in a directory.Can i obtain the returning of directroy.getfiles method for 400.000 files and store the returnings into a string variable.

Does this cause overflow error with default settings , or how can i hande this situation?

Thanks in advance.

推荐答案

10个聪明人中的9个将进行测试以查看其是否有效,而不是假设某个随机的陌生人会知道答案,并相信一个从他们不知道的人那里得到答案,何时才能自己测试答案.我怀疑它能正常工作,因为它返回的只是一个文件名数组.

为什么您实际上希望一个文件夹中有那么多文件?
9 out of 10 intelligent people would test to see if this worked, instead of assuming that some random stranger would know the answer, and trusting an answer from someone they don''t know when it''s trivial to test for the answer yourself. I suspect it will work fine, given that all it returns is an array of filenames.

Why on earth do you expect to have that many files in a folder ?


为什么不尝试呢?这将是字符串的集合.我认为根本不会有任何性能或溢出问题.
Why don''t you try it? This will be a collection of strings. I don''t think there will be any performance or overflow issue at all.


这篇关于directory.getFiles的返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆