CARLA
FileTransfer.h
Go to the documentation of this file.
1 // Copyright (c) 2021 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
9 #include "carla/FileSystem.h"
10 
11 #include <fstream>
12 #include <iostream>
13 #include <string>
14 #include <sys/stat.h>
15 
16 namespace carla {
17 namespace client {
18 
19  class FileTransfer {
20 
21  public:
22 
23  FileTransfer() = delete;
24 
25  static bool SetFilesBaseFolder(const std::string &path);
26 
27  static const std::string& GetFilesBaseFolder();
28 
29  static bool FileExists(std::string file);
30 
31  static bool WriteFile(std::string path, std::vector<uint8_t> content);
32 
33  static std::vector<uint8_t> ReadFile(std::string path);
34 
35  private:
36 
37  static std::string _filesBaseFolder;
38 
39  };
40 
41 } // namespace client
42 } // namespace carla
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
static std::vector< uint8_t > ReadFile(std::string path)
static const std::string & GetFilesBaseFolder()
static bool WriteFile(std::string path, std::vector< uint8_t > content)
static std::string _filesBaseFolder
Definition: FileTransfer.h:37
static bool FileExists(std::string file)
static bool SetFilesBaseFolder(const std::string &path)