Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
121969e7
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
121969e7
编写于
7月 25, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 25, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9358 Add XTS for fs.Watcher interface
Merge pull request !9358 from 冯俊青/master
上级
d4bd2396
de5faf07
变更
4
展开全部
显示空白变更内容
内联
并排
Showing
4 changed file
with
908 addition
and
1 deletion
+908
-1
storage/storagefileiov9jstest/src/main/js/test/Common.js
storage/storagefileiov9jstest/src/main/js/test/Common.js
+7
-0
storage/storagefileiov9jstest/src/main/js/test/List.test.js
storage/storagefileiov9jstest/src/main/js/test/List.test.js
+2
-0
storage/storagefileiov9jstest/src/main/js/test/members/mkdir.test.js
...ragefileiov9jstest/src/main/js/test/members/mkdir.test.js
+2
-1
storage/storagefileiov9jstest/src/main/js/test/members/watcher.test.js
...gefileiov9jstest/src/main/js/test/members/watcher.test.js
+897
-0
未找到文件。
storage/storagefileiov9jstest/src/main/js/test/Common.js
浏览文件 @
121969e7
...
@@ -83,6 +83,13 @@ export function randomString(num) {
...
@@ -83,6 +83,13 @@ export function randomString(num) {
return
pwd
;
return
pwd
;
}
}
export
async
function
sleep
(
times
)
{
if
(
!
times
)
{
times
=
10
;
}
await
new
Promise
((
res
)
=>
setTimeout
(
res
,
times
));
}
function
isIntNum
(
val
)
{
function
isIntNum
(
val
)
{
return
typeof
val
===
'
number
'
&&
val
%
1
===
0
;
return
typeof
val
===
'
number
'
&&
val
%
1
===
0
;
}
}
...
...
storage/storagefileiov9jstest/src/main/js/test/List.test.js
浏览文件 @
121969e7
...
@@ -47,6 +47,7 @@ import fileIOStreamWrite from './class_stream/write.test.js'
...
@@ -47,6 +47,7 @@ import fileIOStreamWrite from './class_stream/write.test.js'
import
fileIOSymlink
from
'
./members/symlink.test.js
'
import
fileIOSymlink
from
'
./members/symlink.test.js
'
import
fileIOTruncate
from
'
./members/truncate.test.js
'
import
fileIOTruncate
from
'
./members/truncate.test.js
'
import
fileIOUnlink
from
'
./members/unlink.test.js
'
import
fileIOUnlink
from
'
./members/unlink.test.js
'
import
fileIOWatcher
from
'
./members/watcher.test.js
'
import
fileIOWrite
from
'
./members/write.test.js
'
import
fileIOWrite
from
'
./members/write.test.js
'
import
fileIORW
from
'
./members/filerw.test.js
'
import
fileIORW
from
'
./members/filerw.test.js
'
export
default
function
testsuite
()
{
export
default
function
testsuite
()
{
...
@@ -84,6 +85,7 @@ export default function testsuite() {
...
@@ -84,6 +85,7 @@ export default function testsuite() {
fileIOSymlink
()
fileIOSymlink
()
fileIOTruncate
()
fileIOTruncate
()
fileIOUnlink
()
fileIOUnlink
()
fileIOWatcher
()
fileIOWrite
()
fileIOWrite
()
fileIORW
()
fileIORW
()
}
}
storage/storagefileiov9jstest/src/main/js/test/members/mkdir.test.js
浏览文件 @
121969e7
...
@@ -224,9 +224,10 @@ describe('fileIO_fs_mkdir', function () {
...
@@ -224,9 +224,10 @@ describe('fileIO_fs_mkdir', function () {
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
expect
(
prepareFile
(
fpath
,
FILE_CONTENT
)).
assertTrue
();
try
{
try
{
await
fileIO
.
mkdir
Sync
(
fpath
);
await
fileIO
.
mkdir
(
fpath
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
catch
(
e
)
{
}
catch
(
e
)
{
fileIO
.
unlinkSync
(
fpath
);
console
.
log
(
'
fileIO_test_mkdir_async_004 has failed for
'
+
e
.
message
+
'
, code:
'
+
e
.
code
);
console
.
log
(
'
fileIO_test_mkdir_async_004 has failed for
'
+
e
.
message
+
'
, code:
'
+
e
.
code
);
expect
(
e
.
code
==
13900015
&&
e
.
message
==
'
File exists
'
).
assertTrue
();
expect
(
e
.
code
==
13900015
&&
e
.
message
==
'
File exists
'
).
assertTrue
();
}
}
...
...
storage/storagefileiov9jstest/src/main/js/test/members/watcher.test.js
0 → 100644
浏览文件 @
121969e7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录