Add SetCustomSavePath API to Nearby Connections

PiperOrigin-RevId: 492563503
This commit is contained in:
Aaron Yu
2022-12-02 14:38:55 -08:00
committed by Copybara-Service
parent 2273c87b57
commit 49af1a96b6
20 changed files with 193 additions and 82 deletions
@@ -63,8 +63,13 @@ namespace location {
namespace nearby {
namespace api {
std::string ImplementationPlatform::GetCustomSavePath(
const std::string& parent_folder, const std::string& file_name) {
return file::JoinPath(parent_folder, file_name);
}
std::string ImplementationPlatform::GetDownloadPath(
absl::string_view parent_folder, absl::string_view file_name) {
const std::string& parent_folder, const std::string& file_name) {
std::string fullPath("/tmp");
return file::JoinPath("/tmp", file_name);
@@ -122,7 +127,7 @@ std::unique_ptr<InputFile> ImplementationPlatform::CreateInputFile(
}
std::unique_ptr<InputFile> ImplementationPlatform::CreateInputFile(
absl::string_view file_path, size_t size) {
const std::string& file_path, size_t size) {
return shared::IOFile::CreateInputFile(file_path, size);
}
@@ -137,7 +142,7 @@ std::unique_ptr<OutputFile> ImplementationPlatform::CreateOutputFile(
}
std::unique_ptr<OutputFile> ImplementationPlatform::CreateOutputFile(
absl::string_view file_path) {
const std::string& file_path) {
return shared::IOFile::CreateOutputFile(file_path);
}