/test/xts/acts/storage/storagefileiov9jstest/src/main/js/test/class_file/ |
D | fileLock.test.js | 38 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 39 expect(isIntNum(file.fd)).assertTrue(); 40 await file.lock(); 41 file.unlock(); 43 fileIO.closeSync(file); 67 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 68 expect(isIntNum(file.fd)).assertTrue(); 69 await file.lock(true); 70 file.unlock(); 72 fileIO.closeSync(file); [all …]
|
D | filegetParent.test.js | 42 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 43 expect(isIntNum(file.fd)).assertTrue(); 44 expect(file.getParent() == str).assertTrue(); 45 fileIO.closeSync(file); 70 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE | fileIO.OpenMode.CREATE); 71 expect(isIntNum(file.fd)).assertTrue(); 72 expect(file.getParent() == str).assertTrue(); 73 fileIO.closeSync(file); 94 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 97 expect(isIntNum(file.fd)).assertTrue(); [all …]
|
D | file.test.js | 40 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 41 expect(isIntNum(file.fd)).assertTrue(); 42 expect(file.path === fpath).assertTrue(); 43 expect(file.name === 'fileIO_test_open_file_000').assertTrue(); 44 fileIO.closeSync(file); 68 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 69 let newFile = fileIO.dup(file.fd); 72 expect(file.name === 'fileIO_test_dup_file_001').assertTrue(); 73 fileIO.closeSync(file);
|
/test/xts/acts/storage/storagefileiov9jstest/src/main/js/test/members/ |
D | write.test.js | 38 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 39 expect(isIntNum(file.fd)).assertTrue(); 40 let bytesWritten1 = fileIO.writeSync(file.fd, FILE_CONTENT); 42 let bytesWritten2 = fileIO.writeSync(file.fd, new ArrayBuffer(FILE_CONTENT.length)); 44 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096), { offset: 0 }); 46 fileIO.closeSync(file); 69 let file = fileIO.openSync(fpath, fileIO.OpenMode.WRITE_ONLY); 70 expect(isIntNum(file.fd)).assertTrue(); 71 let bytesWritten = fileIO.writeSync(file.fd, FILE_CONTENT, { 75 fileIO.closeSync(file); [all …]
|
D | read.test.js | 38 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 39 expect(isIntNum(file.fd)).assertTrue(); 40 let readLen1 = fileIO.readSync(file.fd, new ArrayBuffer(16)); 42 let readLen2 = fileIO.readSync(file.fd, new ArrayBuffer(8)); 44 fileIO.closeSync(file); 67 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 68 expect(isIntNum(file.fd)).assertTrue(); 69 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096), { 73 fileIO.closeSync(file); 94 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); [all …]
|
D | lseek.test.js | 39 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 40 let pnumber = fileIO.lseek(file.fd, 5); 42 fileIO.closeSync(file); 65 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 66 let pnumber = fileIO.lseek(file.fd, 3, fileIO.WhenceType.SEEK_SET); 68 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096)); 70 fileIO.closeSync(file); 93 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 94 let pnumber = fileIO.lseek(file.fd, 3, fileIO.WhenceType.SEEK_CUR); 96 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096)); [all …]
|
D | filerw.test.js | 28 async function IOfunc(file, bf, total, rand, read, promise) { argument 41 … fileIO.read(file.fd, array, { length: bf, offset: offset }).then((readLen) => { 47 …fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }).then((writeLen) =>… 55 … fileIO.read(file.fd, array, { length: bf, offset: offset }, (err, readLen) => { 62 …fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }, (err, writeLen) =>… 71 fileIO.fsyncSync(file.fd); 99 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 100 expect(isIntNum(file.fd)).assertTrue(); 101 let averagerate = await IOfunc(file, 0x1400, 0xC800000, true, true, true); 104 fileIO.closeSync(file); [all …]
|
D | open.test.js | 38 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 39 expect(isIntNum(file.fd)).assertTrue(); 40 let readlen = fileIO.readSync(file.fd, new ArrayBuffer(4096)); 42 fileIO.closeSync(file); 65 let file = fileIO.openSync(fpath, fileIO.OpenMode.WRITE_ONLY); 66 expect(isIntNum(file.fd)).assertTrue(); 67 let bytesWritten = fileIO.writeSync(file.fd, FILE_CONTENT); 69 fileIO.closeSync(file); 92 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 93 expect(isIntNum(file.fd)).assertTrue(); [all …]
|
D | truncate.test.js | 40 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 41 expect(isIntNum(file.fd)).assertTrue(); 42 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096)); 44 fileIO.closeSync(file); 66 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 70 expect(isIntNum(file.fd)).assertTrue(); 71 fileIO.truncate(file.fd, truncateLen, (err) => { 76 let readLen = fileIO.readSync(file.fd, new ArrayBuffer(4096)); 78 fileIO.closeSync(file); 105 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); [all …]
|
D | stat.test.js | 47 let file = fileIO.openSync(fpath); 48 let stat2 = fileIO.statSync(file.fd); 50 fileIO.closeSync(file); 118 let file = fileIO.openSync(fpath); 119 let stat2 = fileIO.statSync(file.fd); 121 fileIO.closeSync(file); 147 let file = fileIO.openSync(fpath); 148 let stat2 = fileIO.statSync(file.fd); 150 fileIO.closeSync(file); 176 let file = fileIO.openSync(fpath); [all …]
|
D | close.test.js | 38 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 39 fileIO.closeSync(file.fd); 62 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 63 fileIO.closeSync(file); 86 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 87 let fd = file.fd; 88 fileIO.closeSync(file); 113 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 114 fileIO.closeSync(file); 115 fileIO.closeSync(file); [all …]
|
D | fdopenStream.test.js | 36 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 37 expect(isIntNum(file.fd)).assertTrue(); 38 let fpr = fileIO.fdopenStreamSync(file.fd, 'r'); 87 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 90 expect(isIntNum(file.fd)).assertTrue(); 91 let fpr = fileIO.fdopenStreamSync(file.fd, 'r+'); 137 let file = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 140 expect(isIntNum(file.fd)).assertTrue(); 141 fileIO.fdopenStreamSync(file.fd, 'ohos'); 144 fileIO.closeSync(file); [all …]
|
/test/xts/acts/bundlemanager/zlib/actszlibtest/ |
D | ActsZlibTest.cpp | 67 static int TestGzPrintf(gzFile file, const char *format, ...) in TestGzPrintf() argument 74 ret = gzvprintf(file, format, va); in TestGzPrintf() 162 gzFile file; 164 file = gzopen(TESTFILE, "wb"); 165 ASSERT_TRUE(file != NULL); 167 gzputc(file, 'h'); 168 ASSERT_TRUE(gzputs(file, "ello") == FOUR); 169 if (gzprintf(file, ", %s!", "hello") != EIGHT) { 170 fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); 174 gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ [all …]
|
/test/xts/acts/storage/crossplatform/storagefsetstest/src/main/ets/test/members/ |
D | read.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 25 * Open the file in read-only mode, default read from current offset. 35 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_ONLY); 36 expect(isIntNum(file.fd)).assertTrue(); 37 let readLen1: number = await fileIO.read(file.fd, new ArrayBuffer(16)); 39 let readLen2: number = await fileIO.read(file.fd, new ArrayBuffer(8)); 41 fileIO.closeSync(file); 54 * Open the file in write-only mode, verifying it is not readable. 62 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.WRITE_ONLY); [all …]
|
D | write.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 25 * Open the file in write-only mode, default write from current offset. 35 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 36 expect(isIntNum(file.fd)).assertTrue(); 37 let bytesWritten1: number = await fileIO.write(file.fd, FILE_CONTENT); 39 … let bytesWritten2: number = await fileIO.write(file.fd, new ArrayBuffer(FILE_CONTENT.length)); 41 let readLen: number = fileIO.readSync(file.fd, new ArrayBuffer(4096), { 45 fileIO.closeSync(file); 58 * Open the file in read-only mode, verifying that it is not writable. [all …]
|
D | open.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 26 * Open the file in read-only mode, verifying the file is readable. 34 let file: fileIO.File = await fileIO.open(fpath, fileIO.OpenMode.READ_ONLY); 37 expect(isIntNum(file.fd)).assertTrue(); 38 fileIO.read(file.fd, new ArrayBuffer(4096)).then((readLen) => { 41 fileIO.writeSync(file.fd, new ArrayBuffer(4096)); 44 fileIO.closeSync(file) 47 expect(e.code == 13900008 && e.message == "Bad file descriptor").assertTrue(); 56 * Open the file in write-only mode, verifying the file is writable. [all …]
|
D | truncate.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 25 * Truncate the file with path and truncateLen = 5. 37 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 38 expect(isIntNum(file.fd)).assertTrue(); 39 let readLen: number = fileIO.readSync(file.fd, new ArrayBuffer(4096)); 41 fileIO.closeSync(file); 54 * Truncate the file with fd and truncateLen = 5. 62 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 66 expect(isIntNum(file.fd)).assertTrue(); [all …]
|
D | close.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 25 * Open file and close file by fd. 35 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 36 await fileIO.close(file.fd); 49 * Open file and close file by file object. 59 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); 60 await fileIO.close(file); 73 * Test file has been closed. 83 let file: fileIO.File = fileIO.openSync(fpath, fileIO.OpenMode.READ_WRITE); [all …]
|
D | stat.test.ets | 4 * you may not use this file except in compliance with the License. 17 import fileIO from "@ohos.file.fs"; 25 * Enter the path or fd parameter to get the file stat. 38 let file: fileIO.File = fileIO.openSync(fpath); 39 let stat2: fileIO.Stat = await fileIO.stat(file.fd); 41 fileIO.closeSync(file); 54 * The path point to nothing, no such file. 67 expect(e.code == 13900002 && e.message == "No such file or directory").assertTrue(); 96 * Enter the path or fd parameter to get the file stat. 114 let file: fileIO.File = fileIO.openSync(fpath); [all …]
|
/test/xts/acts/hiviewdfx/hiappeventtest/hiappeventcpptest/ |
D | HiAppEventCPPTest.cpp | 76 std::vector<std::string> file; variable 77 file = getfileinpath(logPath); 78 getlogFile = accumulate(file.begin(), file.end(), getlogFile); 111 std::vector<std::string> file; variable 112 file = getfileinpath(logPath); 113 getlogFile = accumulate(file.begin(), file.end(), getlogFile); 145 std::vector<std::string> file; variable 146 file = getfileinpath(logPath); 147 getlogFile = accumulate(file.begin(), file.end(), getlogFile); 179 std::vector<std::string> file; variable [all …]
|
/test/xts/acts/distributeddatamgr/distributedKVStoretest/distributedKVStorejstest/hap/src/main/js/test/ |
D | KvStoreBackupPromiseJsTest.js | 102 function publicBackup(kvStore,file){ argument 103 console.log(`Test backup ${JSON.stringify(file)}`) 105 kvStore.backup(file).then((data) => { 137 function publicRestoreSp(kvStore,file){ argument 138 console.log(`Test restoresp ${JSON.stringify(file)}`) 140 kvStore.restore(file).then((data) => { 176 let file = ''; variable 177 let files =new Array(file); 244 file = '123' ; 245 files[0] = file ; [all …]
|
D | KvStoreBackupCallbackJsTest.js | 105 function publicBackup(kvStore,file){ argument 106 console.log(`Test backup ${JSON.stringify(file)}`) 108 kvStore.backup(file, function(err, data){ 144 function publicRestoreSp(kvStore,file){ argument 145 console.log(`Test restoresp ${JSON.stringify(file)}`) 147 kvStore.restore(file, function(err, data){ 184 let file = ''; variable 185 let files =new Array(file); 255 file = '123' ; 256 files[0] = file ; [all …]
|
/test/xts/acts/storage/storagefilejstest/src/main/js/test/ |
D | File.test.js | 17 import file from '@system.file'; 48 file.delete({ 68 file.mkdir({ 72 file.delete({ 97 file.delete({ 122 file.delete({ 142 file.delete({ 171 file.delete({ 191 file.writeText({ 196 file.delete({ [all …]
|
/test/xts/acts/ability/ability_runtime/stage/actsuripermission/actsassistanthap/entry/src/main/ets/Hap2MainAbility1/ |
D | Hap2MainAbility1.ts | 57 fs.open(uri, fs.OpenMode.READ_ONLY).then((file) => { 58 console.info('file fd: ' + file.fd); 71 fs.open(uri, fs.OpenMode.READ_WRITE).then((file) => { 72 console.info('file fd: ' + file.fd); 104 fs.open(uri, fs.OpenMode.READ_ONLY).then((file) => { 105 console.info('file fd: ' + file.fd); 118 fs.open(uri, fs.OpenMode.READ_WRITE).then((file) => { 119 console.info('file fd: ' + file.fd); 141 fs.open(uri, fs.OpenMode.READ_ONLY).then((file) => { 142 console.info('file fd: ' + file.fd); [all …]
|
/test/xts/acts/storage/storagefileiov9jstest/src/main/js/test/ |
D | Common.js | 29 let file = fileIO.openSync(fpath, fileIO.OpenMode.CREATE | fileIO.OpenMode.READ_WRITE) 30 fileIO.truncateSync(file.fd) 31 fileIO.writeSync(file.fd, content) 32 fileIO.fsyncSync(file.fd) 33 fileIO.closeSync(file) 44 let file = fileIO.openSync(fpath, fileIO.OpenMode.CREATE | fileIO.OpenMode.READ_WRITE) 45 fileIO.truncateSync(file.fd) 49 …let writeLen = fileIO.writeSync(file.fd, bf, { offset: offset, length: bf.byteLength, encoding: 'u… 51 fileIO.fsyncSync(file.fd) 52 fileIO.closeSync(file)
|