Lines Matching refs:file_location

34 static std::string ExtractISA(const std::string& file_location) {  in ExtractISA()  argument
35 std::vector<std::string> split_file_location = android::base::Split(file_location, "/"); in ExtractISA()
40 << split_file_location.size() << " for " << file_location; in ExtractISA()
48 static std::string ExtractAPKName(const std::string& file_location) { in ExtractAPKName() argument
50 size_t file_location_start = file_location.rfind('/'); in ExtractAPKName()
54 size_t ext_start = file_location.rfind('.'); in ExtractAPKName()
58 std::string apk_name = file_location.substr(file_location_start + 1, in ExtractAPKName()
67 static bool SystemBFilenameToCacheFile(const std::string& file_location, in SystemBFilenameToCacheFile() argument
70 size_t initial_position = file_location[0] == '/' ? 1 : 0; in SystemBFilenameToCacheFile()
71 size_t apk_position = file_location.find("/oat", initial_position); in SystemBFilenameToCacheFile()
78 cache_file += file_location.substr(initial_position, apk_position); in SystemBFilenameToCacheFile()
87 std::string apk_name = ExtractAPKName(file_location); in SystemBFilenameToCacheFile()
89 LOG(ERROR) << "Unable to determine apk name from file name '" << file_location << "'"; in SystemBFilenameToCacheFile()
92 std::string::size_type pos = file_location.find_last_of('.'); in SystemBFilenameToCacheFile()
94 LOG(ERROR) << "Invalid file location '" << file_location << "'"; in SystemBFilenameToCacheFile()
98 std::string extension(file_location.substr(pos)); in SystemBFilenameToCacheFile()
111 static bool SystemBFileToCacheFile(const std::string& file_location, in SystemBFileToCacheFile() argument
113 std::string isa = ExtractISA(file_location); in SystemBFileToCacheFile()
115 LOG(ERROR) << "Unable to determine isa for file '" << file_location << "', skipping"; in SystemBFileToCacheFile()
120 return SystemBFilenameToCacheFile(file_location, output_file_location); in SystemBFileToCacheFile()
132 std::string file_location(argv[1]); in main() local
134 if (!SystemBFileToCacheFile(file_location, output_file_location)) { in main()