-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/test/java/org/hy/common/file/junit/JU_OpenFileCount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package org.hy.common.file.junit; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.FileStore; | ||
import java.nio.file.FileSystems; | ||
import java.nio.file.WatchService; | ||
|
||
import org.junit.Test; | ||
|
||
|
||
|
||
|
||
|
||
/** | ||
* 测试单元:打开文件的数量 | ||
* | ||
* @author ZhengWei(HY) | ||
* @createDate 2024-01-17 | ||
* @version v1.0 | ||
*/ | ||
public class JU_OpenFileCount | ||
{ | ||
|
||
@Test | ||
public void test01() throws IOException | ||
{ | ||
WatchService v_WatchService = FileSystems.getDefault().newWatchService(); | ||
|
||
for (FileStore v_Item : FileSystems.getDefault().getFileStores()) | ||
{ | ||
System.out.println(v_Item); | ||
} | ||
} | ||
|
||
} |