decord/source/utils/FileManagerUtils.android.tsx

82 lines
2.7 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 8289
// Function ID: 65323
2026-07-20 16:05:17 +00:00
// Name: _readFile
2026-07-23 10:11:24 +00:00
// Dependencies: [5, 3, 1247, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearFolder, moveFile, readFile, removeFile, writeFile
2026-07-24 07:16:23 +00:00
// Module 8289 (_readFile)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import importDefaultResult from "set";
2026-07-22 07:54:56 +00:00
2026-07-23 10:11:24 +00:00
async function _readFile(arg0, arg1, arg2, arg3) {
if (null == outer2_0(outer2_1[2])) {
2026-07-20 16:05:17 +00:00
if (null == null) {
return null;
} else {
if (yield obj4.fileExists(tmp7 + "/" + arg1)) {
2026-07-23 10:11:24 +00:00
return yield outer2_0(outer2_1[2]).readFile(null + "/" + arg1, arg2);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
2026-07-23 10:11:24 +00:00
obj4 = outer2_0(outer2_1[2]);
2026-07-20 16:05:17 +00:00
}
} else if ("cache" === arg0) {
2026-07-23 10:11:24 +00:00
let DocumentsDirPath = outer2_0(outer2_1[2]).getConstants().CacheDirPath;
const obj2 = outer2_0(outer2_1[2]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
DocumentsDirPath = outer2_0(outer2_1[2]).getConstants().DocumentsDirPath;
const obj = outer2_0(outer2_1[2]);
2026-07-20 16:05:17 +00:00
}
}
importDefaultResult = new importDefaultResult("FileManagerUtils");
2026-07-23 10:11:24 +00:00
const result = require("enforcing").fileFinishedImporting("utils/FileManagerUtils.android.tsx");
2026-07-20 16:05:17 +00:00
export const writeFile = function writeFile(cache, combined1, arg2, utf8) {
let nextPromise;
2026-07-23 10:11:24 +00:00
if (null != importDefault(1247)) {
const obj = importDefault(1247);
2026-07-20 16:05:17 +00:00
nextPromise = obj.writeFile(cache, combined1, arg2, utf8).then((arg0) => "file:" + arg0);
const writeFileResult = obj.writeFile(cache, combined1, arg2, utf8);
}
if (null == nextPromise) {
nextPromise = Promise.reject("RTNFileManager doesn't exist?");
}
return nextPromise;
};
export const moveFile = function moveFile(arg0, arg1, filePathForGif) {
let moveFileResult;
2026-07-23 10:11:24 +00:00
if (null != importDefault(1247)) {
moveFileResult = importDefault(1247).moveFile(arg0, arg1, filePathForGif);
const obj = importDefault(1247);
2026-07-20 16:05:17 +00:00
}
if (null == moveFileResult) {
moveFileResult = Promise.reject(false);
}
return moveFileResult;
};
export const removeFile = function removeFile(cache, filePathForGif) {
let removeFileResult;
2026-07-23 10:11:24 +00:00
if (null != importDefault(1247)) {
removeFileResult = importDefault(1247).removeFile(cache, filePathForGif);
const obj = importDefault(1247);
2026-07-20 16:05:17 +00:00
}
if (null == removeFileResult) {
removeFileResult = Promise.reject(false);
}
return removeFileResult;
};
export const clearFolder = function clearFolder(cache, arg1) {
let clearFolderResult;
2026-07-23 10:11:24 +00:00
if (null != importDefault(1247)) {
clearFolderResult = importDefault(1247).clearFolder(cache, arg1);
const obj = importDefault(1247);
2026-07-20 16:05:17 +00:00
}
if (null == clearFolderResult) {
clearFolderResult = Promise.reject(false);
}
return clearFolderResult;
};
export const readFile = function readFile(documents, filePathForGif, utf8) {
return _readFile(...arguments);
};