From 969e580ee99926f854b98f779975df850dc52525 Mon Sep 17 00:00:00 2001 From: hu0475 Date: Thu, 13 Jul 2023 14:13:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9storage=E5=AD=90=E7=B3=BB?= =?UTF-8?q?=E7=BB=9Ffs=E6=A8=A1=E5=9D=97=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hu0475 --- .../src/main/ets/test/Common.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/storage/crossplatform/storagefsetstest/src/main/ets/test/Common.js b/storage/crossplatform/storagefsetstest/src/main/ets/test/Common.js index 1b397330d..2b8a9205d 100644 --- a/storage/crossplatform/storagefsetstest/src/main/ets/test/Common.js +++ b/storage/crossplatform/storagefsetstest/src/main/ets/test/Common.js @@ -15,7 +15,6 @@ import fileIO from "@ohos.file.fs"; import util from "@ohos.util"; -//import featureAbility from '@ohos.ability.featureAbility'; export const FILE_CONTENT = "hello world"; @@ -35,24 +34,6 @@ export function prepareFile(fpath, content) { } } -export function prepare200MFile(fpath) { - try { - let file = fileIO.openSync(fpath, fileIO.OpenMode.CREATE | fileIO.OpenMode.READ_WRITE); - fileIO.truncateSync(file.fd); - let bf = new ArrayBuffer(1024 * 1024 * 20); - for (let i = 0; i < 10; i++) { - let position = bf.byteLength * i; - let writeLen = fileIO.writeSync(file.fd, bf, { offset: 0, length: bf.byteLength, position: position, encoding: "utf-8" }); - } - fileIO.fsyncSync(file.fd); - fileIO.closeSync(file); - return true; - } catch (e) { - console.log("Failed to prepare200MFile for " + e); - return false; - } -} - export async function nextFileName(testName) { let context = globalThis.abilityContext; let data = context.cacheDir; -- GitLab