MCPcopy Create free account
hub / github.com/bluescan/tacentview / NodeToDir

Method NodeToDir

Src/FileDialog.cpp:1881–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1879
1880
1881tString FileDialog::NodeToDir(const TreeNode* node)
1882{
1883 if (!node)
1884 return tString();
1885
1886 bool isNetworkLoc = node->IsNetworkLocation();
1887
1888 tString dir;
1889 while (node)
1890 {
1891 if (!node->Name.IsEmpty() && (node->Depth() > 0))
1892 {
1893 if (isNetworkLoc && (node->Depth() == 1))
1894 dir = node->Name + "\\" + dir;
1895 else
1896 dir = node->Name + "/" + dir;
1897 }
1898 node = node->Parent;
1899 }
1900 if (isNetworkLoc)
1901 dir = tString("\\\\") + dir;
1902
1903 #ifdef PLATFORM_LINUX
1904 dir = tString("/") + dir;
1905 #endif
1906
1907 return dir;
1908}
1909
1910
1911void FileDialog::NodeToPath(tList<tStringItem>& destPathItems, const TreeNode* node)

Callers

nothing calls this directly

Calls 2

IsNetworkLocationMethod · 0.80
DepthMethod · 0.80

Tested by

no test coverage detected