MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / SetPath

Method SetPath

NetStream/source/browsers/local_server_browser.cpp:68–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void LocalServerBrowser::SetPath(const char *ref)
69{
70 if (ref)
71 {
72 if (!sce_paf_strcmp(ref, ".."))
73 {
74 char *tmp = static_cast<char *>(sce_paf_malloc(m_path.length() + 1));
75 sce_paf_strcpy(tmp, m_path.c_str());
76 char *sptr = sce_paf_strrchr(tmp, '/');
77 if (!sptr)
78 {
79 m_path.clear();
80 sce_paf_free(tmp);
81 return;
82 }
83 *sptr = 0;
84 sptr = sce_paf_strrchr(tmp, '/');
85 if (!sptr)
86 {
87 sptr = sce_paf_strchr(tmp, ':');
88 }
89 sptr += 1;
90 *sptr = 0;
91 m_path = tmp;
92 sce_paf_free(tmp);
93 }
94 else
95 {
96 m_path += ref;
97 }
98 }
99 else
100 {
101 m_path.clear();
102 }
103}
104
105bool LocalServerBrowser::DefaultFsSort(const LocalServerBrowser::Entry *a, const LocalServerBrowser::Entry *b)
106{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected