~morphis/aethercast/enable-arm64-builds

« back to all changes in this revision

Viewing changes to src/mcs/utils.cpp

  • Committer: Tarmac
  • Author(s): Simon Fels
  • Date: 2016-02-04 06:38:31 UTC
  • mfrom: (119.1.65 trunk)
  • Revision ID: tarmac-20160204063831-b6q9o8ktznevvd8x
Add a network manager implementation to use the DBus interface of wpa-supplicant.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 *
16
16
 */
17
17
 
 
18
#include <boost/filesystem.hpp>
18
19
#include <boost/algorithm/string.hpp>
19
20
 
20
21
#include <memory>
 
22
#include <fstream>
21
23
 
22
24
#include <cstring>
23
25
#include <cstdarg>
46
48
        return std::string("");
47
49
    return std::string(value);
48
50
}
 
51
 
 
52
bool Utils::CreateFile(const std::string &file_path) {
 
53
    boost::filesystem::path p(file_path);
 
54
    if (boost::filesystem::exists(p))
 
55
        return false;
 
56
 
 
57
    std::ofstream of;
 
58
    of.open(file_path, std::ofstream::out);
 
59
    of << "";
 
60
    of.close();
 
61
    return true;
 
62
}
49
63
} // namespace mcs