Lines Matching defs:file

4  * you may not use this file except in compliance with the License.
95 LOG.error("Uncompress::unpackageProcess create out file directory failed!");
461 File file = null;
465 file = File.createTempFile(HAP_PREFIX, HAP_SUFFIX, directory);
466 writeToTempFile(stream, file);
467 fileStream = new FileInputStream(file);
472 parseStream = new FileInputStream(file);
485 if (file != null) {
486 FileUtils.deleteFile(file.getPath());
496 * @param srcPath source file path
497 * @param destDirPath destination file path
521 * unzip process from the file
524 * @param srcPath source file path
525 * @param destDirPath destination file path
575 LOG.error("Input invalid file: " + tempPath);
576 throw new BundleException("Input invalid file " + tempPath);
598 * @param zipFile input zip file
599 * @param entry input file in zip
600 * @param destFile output file path
608 LOG.error("Input invalid file " + destFile.getCanonicalPath());
609 throw new BundleException("Input invalid file" + destFile.getCanonicalPath());
622 LOG.error("Uncompress::dataTransfer file " + exception.getMessage());
633 * @param srcPath source file path
634 * @param destDirPath destination file path
641 throw new BundleException("Input invalid file " + srcPath);
659 LOG.error("Uncompress::unzipApk file not found exception: " + ignored.getMessage());
704 LOG.error("Uncompress::unzipApk file failed " + exception.getMessage());
755 * uncompress from specified file name
758 * @param srcPath source file path
759 * @param fileName uncompress file name
859 * @param fileName uncompress file name
886 * @param fileName uncompress file name
939 * @param srcPath source file path
940 * @param destDirPath destination file path
941 * @param fileName target file name
971 * compress file directory.
973 * @param srcPath source file path
974 * @param destDirPath destination file path
975 * @param fileName target file name
1004 throw new BundleException("Input invalid file" + zipPath);
1037 * compress file directory.
1039 * @param dir file directory
1040 * @param baseDir base path for file
1051 for (File file : files) {
1052 if (file.isDirectory()) {
1053 compressDirectory(file, baseDir + dir.getName() + File.separator, zipOut, isCompression);
1055 compressFile(file, baseDir + dir.getName() + File.separator, zipOut, isCompression);
1063 * @param srcFile source file to zip
1064 * @param baseDir base path for file
1100 LOG.error("Uncompress::compressFile file not found exception: " + ignored.getMessage());
1101 throw new BundleException("Compress file failed");
1104 throw new BundleException("Compress file failed");
1112 * get CRC32 from file.
1114 * @param file source file
1118 private static CRC32 getCrcFromFile(File file) throws BundleException {
1122 fileInputStream = new FileInputStream(file);
1131 LOG.error("Uncompressor::getCrcFromFile file not found exception");
1132 throw new BundleException("Get Crc from file failed");
1135 throw new BundleException("Get Crc from file failed");
1143 * delete file
1145 * @param file the file to be deleted
1147 private static void deleteFile(File file) {
1148 if (file.exists()) {
1149 if (file.isDirectory()) {
1150 File[] files = file.listFiles();
1155 file.delete();
1338 * uncompress from specified file name
1341 * @param srcPath source file path
1342 * @param fileName uncompress file name
1371 * @param fileName indicates json file name.
1396 * @param zipFile is the hap file
1422 * @param fileName the file name of json file.
1442 * unzip module hap from zip file.
1508 LOG.error("Uncompress::isModuleHap file not found exception");
1552 * create file output stream from InputStream .
1555 * @param file Indicates the temp file to save input stream.
1557 static void writeToTempFile(InputStream stream, File file) throws BundleException {
1560 if (file == null) {
1561 LOG.error("file not exist!");
1563 fileOutputStream = new FileOutputStream(file);
1578 * copy rpcid.sc file.
1581 * @param rpcidPath Indicates the output path of rpcid.sc file.
1612 LOG.error("Uncompress::getRpcidFromHap hap has no rpcid.sc file");
1613 throw new BundleException("Uncompress::getRpcidFromHap hap has no rpcid.sc file");
1626 * parse resource.index file.
1643 * uncompress appqf file.
1661 LOG.error("uncompressAPPQFFile: Input invalid file" + filePath);
1662 throw new BundleException("uncompressAPPQFFile: Input invalid file" + filePath);
1671 LOG.error("Uncompress::uncompressAPPQFFile file not found exception");
1672 throw new BundleException("Uncompress::uncompressAPPQFFile file not found");
1682 * parse appqf file, .
1684 * @param appqfPath is the path of appqf file.