Home
last modified time | relevance | path

Searched refs:fileName (Results 1 – 25 of 251) sorted by relevance

1234567891011

/test/xts/acts/commonlibrary_lite/file_hal/src/
Dutils_file_func_test.c66 char* fileName = "testfile101"; variable
67 int fd = UtilsFileOpen(fileName, O_RDONLY_FS | O_CREAT_FS, 0);
71 UtilsFileDelete(fileName);
81 char* fileName = "testfile102"; variable
82 int fd = UtilsFileOpen(fileName, O_WRONLY_FS | O_CREAT_FS, 0);
86 UtilsFileDelete(fileName);
96 char* fileName = "testfile103"; variable
97 int fd = UtilsFileOpen(fileName, O_RDWR_FS | O_CREAT_FS, 0);
101 UtilsFileDelete(fileName);
111 char* fileName = "testfile104"; variable
[all …]
/test/xts/acts/security_lite/huks/common/
Dhks_test_file_operator.c44 static int32_t GetFileName(const char *path, const char *fileName, char *fullFileName, uint32_t ful… in GetFileName() argument
57 if (strncat_s(fullFileName, fullFileNameLen, fileName, strlen(fileName)) != EOK) { in GetFileName()
61 if (strncpy_s(fullFileName, fullFileNameLen, fileName, strlen(fileName)) != EOK) { in GetFileName()
69 static int32_t GetFullFileName(const char *path, const char *fileName, char **fullFileName) in GetFullFileName() argument
78 int32_t ret = GetFileName(path, fileName, tmpFileName, nameLen); in GetFullFileName()
90 static int32_t IsFileExist(const char *fileName) in IsFileExist() argument
92 if (access(fileName, F_OK) != 0) { in IsFileExist()
99 static uint32_t FileRead(const char *fileName, uint32_t offset, uint8_t *buf, uint32_t len) in FileRead() argument
102 if (IsFileExist(fileName) != HKS_SUCCESS) { in FileRead()
107 if (memcpy_s(filePath, sizeof(filePath) - 1, fileName, strlen(fileName)) != EOK) { in FileRead()
[all …]
/test/xts/device_attest_lite/services/core/mini/utils/
Dattest_utils_file_detail.c60 int32_t GetFileSize(const char* path, const char* fileName, uint32_t* result) in GetFileSize() argument
62 if (path == NULL || fileName == NULL || result == NULL) { in GetFileSize()
66 int32_t ret = UtilsFileStat(fileName, result); in GetFileSize()
73 int32_t WriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen) in WriteFile() argument
75 if (path == NULL || fileName == NULL || data == NULL || dataLen == 0) { in WriteFile()
87 int32_t fd = UtilsFileOpen(fileName, O_CREAT_FS | O_TRUNC_FS | O_RDWR_FS, 0); in WriteFile()
105 int32_t ReadFile(const char* path, const char* fileName, char* buffer, uint32_t bufferLen) in ReadFile() argument
107 if (path == NULL || fileName == NULL || buffer == NULL || bufferLen == 0) { in ReadFile()
113 if (GetFileSize(path, fileName, &fileSize) != 0 || fileSize > bufferLen) { in ReadFile()
118 int32_t fd = UtilsFileOpen(fileName, O_EXCL_FS | O_RDWR_FS, 0); in ReadFile()
[all …]
/test/xts/device_attest/services/core/utils/
Dattest_utils_file.c27 char* GenFilePath(const char* dirPath, const char* fileName) in GenFilePath() argument
29 if (dirPath == NULL || fileName == NULL) { in GenFilePath()
33 uint32_t filePathLen = strlen(dirPath) + 1 + strlen(fileName) + 1; in GenFilePath()
41 if (sprintf_s(filePath, filePathLen, "%s%s%s", dirPath, "/", fileName) < 0) { in GenFilePath()
48 int32_t GetFileSize(const char* path, const char* fileName, uint32_t* result) in GetFileSize() argument
50 if (path == NULL || fileName == NULL || result == NULL) { in GetFileSize()
55 char* filePath = GenFilePath(path, fileName); in GetFileSize()
64 ATTEST_LOG_ERROR("[GetFileSize] Invalid path of %s/%s", path, fileName); in GetFileSize()
86 int32_t WriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen) in WriteFile() argument
88 if (path == NULL || fileName == NULL || data == NULL || dataLen == 0) { in WriteFile()
[all …]
/test/xts/device_attest_lite/services/core/small/utils/
Dattest_utils_file_detail.c31 int32_t GetFileSize(const char* path, const char* fileName, uint32_t* result) in GetFileSize() argument
33 if (path == NULL || fileName == NULL || result == NULL) { in GetFileSize()
38 char* filePath = GenFilePath(path, fileName); in GetFileSize()
47 ATTEST_LOG_ERROR("[GetFileSize] Invalid path of %s/%s", path, fileName); in GetFileSize()
69 int32_t WriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen) in WriteFile() argument
71 if (path == NULL || fileName == NULL || data == NULL || dataLen == 0) { in WriteFile()
75 char* filePath = GenFilePath(path, fileName); in WriteFile()
121 int32_t ReadFile(const char* path, const char* fileName, char* buffer, uint32_t bufferLen) in ReadFile() argument
123 if (path == NULL || fileName == NULL || buffer == NULL || bufferLen == 0) { in ReadFile()
129 if (GetFileSize(path, fileName, &fileSize) != 0 || fileSize > bufferLen) { in ReadFile()
[all …]
/test/xts/acts/multimedia/media/media_js_standard/avRecorder/src/main/js/test/
DAVRecorderFuncTest.test.js332 let fileName = avRecorderTestBase.resourceName()
333 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "audio");
350 let fileName = avRecorderTestBase.resourceName()
351 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "audio");
370 let fileName = avRecorderTestBase.resourceName()
371 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "audio");
390 let fileName = avRecorderTestBase.resourceName()
391 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "audio");
410 let fileName = avRecorderTestBase.resourceName()
411 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "audio");
[all …]
DAvVideoRecorderFuncTestOne.test.js1158 let fileName = avVideoRecorderTestBase.resourceName()
1159 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "video");
1194 let fileName = avVideoRecorderTestBase.resourceName()
1195 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "video");
1230 let fileName = avVideoRecorderTestBase.resourceName()
1231 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "video");
1266 let fileName = avVideoRecorderTestBase.resourceName()
1267 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "video");
1302 let fileName = avVideoRecorderTestBase.resourceName()
1303 fdObject = await mediaTestBase.getAvRecorderFd(fileName, "video");
[all …]
/test/xts/device_attest/services/oem_adapter/src/
Ddevice_attest_oem_file.c23 char* OEMGenFilePath(const char* dirPath, const char* fileName) in OEMGenFilePath() argument
25 if (dirPath == NULL || fileName == NULL) { in OEMGenFilePath()
29 (strlen(fileName) >= MAX_ATTEST_MALLOC_BUFF_SIZE) ||\ in OEMGenFilePath()
30 (strlen(dirPath) + strlen(fileName)) >= MAX_ATTEST_MALLOC_BUFF_SIZE) { in OEMGenFilePath()
33 uint32_t filePathLen = strlen(dirPath) + 1 + strlen(fileName) + 1; in OEMGenFilePath()
42 if (sprintf_s(filePath, filePathLen, "%s%s%s", dirPath, "/", fileName) < 0) { in OEMGenFilePath()
49 int32_t OEMGetFileSize(const char* path, const char* fileName, uint32_t* result) in OEMGetFileSize() argument
51 if (path == NULL || fileName == NULL || result == NULL) { in OEMGetFileSize()
55 char* filePath = OEMGenFilePath(path, fileName); in OEMGetFileSize()
81 int32_t OEMWriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen) in OEMWriteFile() argument
[all …]
/test/xts/device_attest_lite/services/core/include/utils/
Dattest_utils_file.h28 char* GenFilePath(const char* dirPath, const char* fileName);
30 int32_t GetFileSize(const char* path, const char* fileName, uint32_t* result);
32 int32_t WriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen);
34 int32_t ReadFile(const char* path, const char* fileName, char* buffer, uint32_t bufferLen);
36 int32_t CreateFile(const char* path, const char* fileName);
38 bool DeleteFile(const char* path, const char* fileName);
40 bool IsFileExist(const char* path, const char* fileName);
42 int32_t ReadFileBuffer(const char* path, const char* fileName, char** outStr);
/test/xts/device_attest/services/core/include/utils/
Dattest_utils_file.h28 char* GenFilePath(const char* dirPath, const char* fileName);
30 int32_t GetFileSize(const char* path, const char* fileName, uint32_t* result);
32 int32_t WriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen);
34 int32_t ReadFile(const char* path, const char* fileName, char* buffer, uint32_t bufferLen);
36 int32_t CreateFile(const char* path, const char* fileName);
38 bool IsFileExist(const char* path, const char* fileName);
40 int32_t ReadFileBuffer(const char* path, const char* fileName, char** outStr);
/test/xts/device_attest_lite/services/core/utils/
Dattest_utils_file.c26 char* GenFilePath(const char* dirPath, const char* fileName) in GenFilePath() argument
28 if (dirPath == NULL || fileName == NULL) { in GenFilePath()
32 uint32_t filePathLen = strlen(dirPath) + 1 + strlen(fileName) + 1; in GenFilePath()
40 if (sprintf_s(filePath, filePathLen, "%s%s%s", dirPath, "/", fileName) < 0) { in GenFilePath()
47 int32_t ReadFileBuffer(const char* path, const char* fileName, char** outStr) in ReadFileBuffer() argument
49 if (path == NULL || fileName == NULL || outStr == NULL) { in ReadFileBuffer()
54 if (GetFileSize(path, fileName, &fileSize) != 0) { in ReadFileBuffer()
66 int32_t ret = ReadFile(path, fileName, buffer, bufferSize); in ReadFileBuffer()
/test/xts/device_attest/services/oem_adapter/include/
Ddevice_attest_oem_file.h31 char* OEMGenFilePath(const char* dirPath, const char* fileName);
33 int32_t OEMGetFileSize(const char* path, const char* fileName, uint32_t* result);
35 int32_t OEMWriteFile(const char* path, const char* fileName, const char* data, uint32_t dataLen);
37 int32_t OEMReadFile(const char* path, const char* fileName, char* buffer, uint32_t bufferLen);
39 int32_t OEMCreateFile(const char* path, const char* fileName);
/test/xts/acts/security_lite/huks/common/include/
Dhks_test_file_operator.h25 int32_t HksIsFileExist(const char *path, const char *fileName);
27 uint32_t HksTestFileSize(const char *path, const char *fileName);
29 uint32_t HksTestFileRead(const char *path, const char *fileName, uint32_t offset, uint8_t *buf, uin…
31 int32_t HksTestFileWrite(const char *path, const char *fileName, uint32_t offset, const uint8_t *bu…
33 int32_t HksTestFileRemove(const char *path, const char *fileName);
/test/testfwk/developer_test/aw/cxx/distributed/
Ddistributed_cfg.cpp35 bool DistributedCfg::OpenCfg(std::string fileName) in OpenCfg() argument
41 cfgFile.open(fileName.c_str()); in OpenCfg()
98 std::string DistributedCfg::GetDeviceIp(std::string fileName, size_t devNo) in GetDeviceIp() argument
101 if (!OpenCfg(fileName)) { in GetDeviceIp()
104 fileName.c_str()); in GetDeviceIp()
111 fileName.c_str()); in GetDeviceIp()
125 std::string DistributedCfg::GetDeviceUuid(std::string fileName, size_t devNo) in GetDeviceUuid() argument
127 if (!OpenCfg(fileName)) { in GetDeviceUuid()
130 fileName.c_str()); in GetDeviceUuid()
137 fileName.c_str()); in GetDeviceUuid()
Ddistributed_cfg.h44 bool OpenCfg(std::string fileName);
47 std::string GetDeviceIp(std::string fileName, size_t devNo);
48 std::string GetDeviceUuid(std::string fileName, size_t devNo);
/test/xts/acts/multimedia/avsource/entry/src/main/cpp/
Dmediaavsourcendk.cpp51 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in AVSourceCreateWithFD() local
52 int fd = open(fileName, O_RDONLY, PARAM_0666); in AVSourceCreateWithFD()
55 if (stat(fileName, &fileStatus) == ZEROVAL) { in AVSourceCreateWithFD()
80 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in AVSourceDestroy() local
81 int fd = open(fileName, O_RDONLY, PARAM_0666); in AVSourceDestroy()
84 if (stat(fileName, &fileStatus) == ZEROVAL) { in AVSourceDestroy()
108 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in AVSourceGetSourceFormat() local
109 int fd = open(fileName, O_RDONLY, PARAM_0666); in AVSourceGetSourceFormat()
112 if (stat(fileName, &fileStatus) == ZEROVAL) { in AVSourceGetSourceFormat()
139 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in AVSourceGetTrackFormat() local
[all …]
Dnativeavdemuxerndk.cpp46 static int64_t GetFileSize(const char *fileName) in GetFileSize() argument
49 if (fileName != nullptr) { in GetFileSize()
58 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in GetSource() local
59 int fd = open(fileName, O_RDWR, PARAM_0666); in GetSource()
128 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in OHAVDemuxerSeekToTime() local
129 int fd = open(fileName, O_RDWR, PARAM_0666); in OHAVDemuxerSeekToTime()
158 char fileName[] = {"/data/storage/el2/base/files/demo.mp4"}; in OHAVDemuxerSelectTrackByID() local
159 int fd = open(fileName, O_RDWR, PARAM_0666); in OHAVDemuxerSelectTrackByID()
/test/xts/tools/sample/AppSampleD/entry/src/main/ets/controller/
DUploadController.ts26 public async uploadFile(fileName: string): Promise<void> {
29 name: fileName,
30 url: `${Constant.UPLOAD_URL}/${fileName}`
33 this.networkModel.uploadFile(Constant.ACTION_UPLOAD, fileName, (res) => {
/test/xts/hats/hdf/hdf_lite/display/
Dloadbmp_test.c63 int32_t GetBmpInfo(const int8_t *fileName, OsdBitMapFileHeader *bmpFileHeader, OsdBitMapInfo *bmpIn… in GetBmpInfo() argument
69 if (realpath((char*)fileName, realPath) == NULL) { in GetBmpInfo()
70 printf("%s: file %s does not exist\n", __func__, fileName); in GetBmpInfo()
74 HDF_LOGE("%s: Open file failure: %s", __func__, fileName); in GetBmpInfo()
114 static int32_t LoadPicToBuffer(const int8_t *fileName, OsdLogo *videoLogo, OsdColorFmt enFmt, in LoadPicToBuffer() argument
124 if (GetBmpInfo(fileName, &bmpFileHeader, &bmpInfo) < 0) { in LoadPicToBuffer()
133 if (realpath((char*)fileName, realPath) == NULL) { in LoadPicToBuffer()
134 printf("%s: file %s does not exist\n", __func__, fileName); in LoadPicToBuffer()
138 HDF_LOGE("%s: Open file failure: %s", __func__, fileName); in LoadPicToBuffer()
272 static int32_t LoadBMPEx(const int8_t *fileName, OsdLogo *videoLogo, OsdColorFmt enFmt) in LoadBMPEx() argument
[all …]
/test/testfwk/developer_test/examples/detector/src/
Ddetector.cpp52 bool FileExist(const char* fileName) in FileExist() argument
54 if (fileName == nullptr) { in FileExist()
58 return (!stat(fileName, &myStat)); in FileExist()
/test/xts/tools/lite/checksum/src/
Dchecksum_file.c132 int CalcSingleFileSha256(char* fileName) in CalcSingleFileSha256() argument
139 if ((fp = fopen(fileName, "rb")) == NULL) { in CalcSingleFileSha256()
140 printf("error: fail to open file %s: %s.\n", fileName, strerror(errno)); in CalcSingleFileSha256()
157 printf("%s:%s\n", fileName, outputStr); in CalcSingleFileSha256()
196 static char pathName[1000], fileName[1000]; in CalcMultiFilesSha256() local
211 fileNewName = CreatePathName(fileName, maxLen, dirPathName, "/", ptr->d_name); in CalcMultiFilesSha256()
/test/xts/acts/multimedia/media/media_js_standard/
DMediaTestBase.js91 export async function getFileDescriptor(fileName) { argument
94 await mgr.getRawFileDescriptor(fileName).then(value => {
96 console.log('case getRawFileDescriptor success fileName: ' + fileName);
103 export async function getStageFileDescriptor(fileName) { argument
106 await mgr.getRawFileDescriptor(fileName).then(value => {
108 console.log('case getRawFileDescriptor success fileName: ' + fileName);
114 export async function closeFileDescriptor(fileName) { argument
116 await mgr.closeRawFileDescriptor(fileName).then(()=> {
117 console.log('case closeRawFileDescriptor ' + fileName);
/test/testfwk/arkxtest/uitest/test/
Dcommon_utilities_test.cpp25 constexpr string_view fileName = "/abc/def/ghi.cpp"; in TEST() local
27 constexpr array<char, MAX_LOG_TAG_LEN> tagChars = GenLogTag(fileName, function); in TEST()
/test/xts/tools/sample/AppSampleD/entry/src/main/ets/model/
DNetworkModel.ts52 public uploadFile(action: string, fileName: string, callback): void {
53 Logger.info(TAG, `upload file create action = ${action}, fileName = ${fileName}`)
64 filename: fileName, name: "file", uri: `internal://cache/${fileName}`, type: "mp4"
/test/xts/tools/sample/AppSampleE/entry/src/main/ets/model/
DNetworkModel.ts52 public uploadFile(action: string, fileName: string, callback): void {
53 Logger.info(TAG, `upload file create action = ${action}, fileName = ${fileName}`);
65 filename: fileName, name: 'file', uri: `internal://cache/${fileName}`, type: 'mp4'

1234567891011