什麼是重複在一個特定的文件夾歸檔的最佳方式,但沒有循環?即當所有文件被檢查一次時,for循環將結束。遍歷在某些目錄中的文件不需要在Java
我的示例代碼(帶環):
File dir = new File(svnClient.getDestinationPath().getAbsolutePath());
for (File child : dir.listFiles())
{
report.report("File name: " + child.getName());
}
沒有循環?你的例子包含一個增強的for循環... – jlordo
*爲什麼*你想這樣做沒有任何循環?你的問題不清楚...... –
迭代,你需要一個循環。這樣做的問題是什麼,你建議? –