未验证 提交 fa8efaea 编写于 作者: O openharmony_ci 提交者: Gitee

!9878 bugfix statfs 修改格式

Merge pull request !9878 from zhuhongtao666/fixstatfs
......@@ -34,10 +34,10 @@ getFreeBytes(path:string):Promise<number>
```js
let path = "/dev";
statfs.getFreeBytes(path).then(function (number){
console.info("getFreeBytes promise successfully:"+ number);
}).catch(function(err){
console.info("getFreeBytes failed with error:"+ err);
statfs.getFreeBytes(path).then(function (number) {
console.info("getFreeBytes promise successfully:" + number);
}).catch(function (err) {
console.info("getFreeBytes failed with error:" + err);
});
```
......@@ -62,8 +62,8 @@ getFreeBytes(path:string, callback:AsyncCallback<number>): void
import featureAbility from '@ohos.ability.featureAbility';
let context = featureAbility.getContext();
context.getFilesDir().then(function (path) {
statfs.getFreeBytes(path, function(err, number){
console.info("getFreeBytes callback successfully:"+ number);
statfs.getFreeBytes(path, function (err, number) {
console.info("getFreeBytes callback successfully:" + number);
});
});
```
......@@ -92,10 +92,10 @@ getTotalBytes(path: string): Promise<number>
```js
let path = "/dev";
statfs.getTotalBytes(path).then(function (number){
console.info("getTotalBytes promise successfully:"+ number);
}).catch(function(err){
console.info("getTotalBytes failed with error:"+ err);
statfs.getTotalBytes(path).then(function (number) {
console.info("getTotalBytes promise successfully:" + number);
}).catch(function (err) {
console.info("getTotalBytes failed with error:" + err);
});
```
......@@ -120,8 +120,8 @@ getTotalBytes(path: string, callback: AsyncCallback<number>): void
import featureAbility from '@ohos.ability.featureAbility';
let context = featureAbility.getContext();
context.getFilesDir().then(function (path) {
statfs.getTotalBytes(path, function(err, number){
console.info("getTotalBytes callback successfully:"+ number);
statfs.getTotalBytes(path, function(err, number) {
console.info("getTotalBytes callback successfully:" + number);
});
});
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册