Lines Matching refs:path
28 bool CreateDirectory(const std::string& path)
30 if (path.empty()) {
33 auto pos = path.find_last_of('/');
35 if (!CreateDirectory(path.substr(0, pos))) {
39 panda::os::CreateDirectories(path);
40 if (!Exists(path)) {
46 bool Exists(const std::string& path)
48 return panda::ecmascript::FileExist(path.c_str());
60 std::size_t FileSize(const std::string& path)
63 stat(path.c_str(), &info);
67 bool RemoveAll(const std::string& path)
70 if (stat(path.c_str(), &info) != 0) {
75 DIR* dir = opendir(path.c_str());
85 std::string entryPath = path + "/" + entry->d_name;
92 return rmdir(path.c_str()) == 0;
94 return unlink(path.c_str()) == 0;