nana::experimental::filesystem
This commit is contained in:
parent
32875bdf4c
commit
9f3060f912
@ -652,7 +652,7 @@ namespace nana { namespace experimental {
|
|||||||
auto stat = status(p, err);
|
auto stat = status(p, err);
|
||||||
|
|
||||||
if (err != std::error_code())
|
if (err != std::error_code())
|
||||||
throw filesystem_error("nana::filesystem::status", p, err);
|
throw filesystem_error("nana::experimental::filesystem::status", p, err);
|
||||||
|
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,7 +142,7 @@ namespace nana
|
|||||||
auto path = path_.caption();
|
auto path = path_.caption();
|
||||||
auto root = path.substr(0, path.find('/'));
|
auto root = path.substr(0, path.find('/'));
|
||||||
if(root == "HOME")
|
if(root == "HOME")
|
||||||
path.replace(0, 4, nana::filesystem::path_user().native());
|
path.replace(0, 4, nana::experimental::filesystem::path_user().native());
|
||||||
else if(root == "FILESYSTEM")
|
else if(root == "FILESYSTEM")
|
||||||
path.erase(0, 10);
|
path.erase(0, 10);
|
||||||
else
|
else
|
||||||
@ -344,7 +344,7 @@ namespace nana
|
|||||||
else
|
else
|
||||||
dir = saved_selected_path;
|
dir = saved_selected_path;
|
||||||
|
|
||||||
_m_load_cat_path(dir.size() ? dir : nana::filesystem::path_user().native());
|
_m_load_cat_path(dir.size() ? dir : nana::experimental::filesystem::path_user().native());
|
||||||
|
|
||||||
tb_file_.caption(file_with_path_removed);
|
tb_file_.caption(file_with_path_removed);
|
||||||
}
|
}
|
||||||
@ -474,7 +474,7 @@ namespace nana
|
|||||||
{
|
{
|
||||||
auto begstr = path.substr(0, pos);
|
auto begstr = path.substr(0, pos);
|
||||||
if(begstr == "FS.HOME")
|
if(begstr == "FS.HOME")
|
||||||
path.replace(0, 7, nana::filesystem::path_user().native());
|
path.replace(0, 7, nana::experimental::filesystem::path_user().native());
|
||||||
else
|
else
|
||||||
path.erase(0, pos);
|
path.erase(0, pos);
|
||||||
return begstr;
|
return begstr;
|
||||||
@ -508,13 +508,13 @@ namespace nana
|
|||||||
{
|
{
|
||||||
m.bytes = fs::file_size(path + m.name);
|
m.bytes = fs::file_size(path + m.name);
|
||||||
m.directory = fs::is_directory(fattr);
|
m.directory = fs::is_directory(fattr);
|
||||||
::nana::filesystem::modified_file_time(path + m.name, m.modified_time);
|
::nana::experimental::filesystem::modified_file_time(path + m.name, m.modified_time);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m.bytes = 0;
|
m.bytes = 0;
|
||||||
m.directory = fs::is_directory(*i);
|
m.directory = fs::is_directory(*i);
|
||||||
::nana::filesystem::modified_file_time(path + i->path().filename().native(), m.modified_time);
|
::nana::experimental::filesystem::modified_file_time(path + i->path().filename().native(), m.modified_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_container_.push_back(m);
|
file_container_.push_back(m);
|
||||||
@ -534,7 +534,7 @@ namespace nana
|
|||||||
while(!beg_node.empty() && (beg_node != nodes_.home) && (beg_node != nodes_.filesystem))
|
while(!beg_node.empty() && (beg_node != nodes_.home) && (beg_node != nodes_.filesystem))
|
||||||
beg_node = beg_node.owner();
|
beg_node = beg_node.owner();
|
||||||
|
|
||||||
auto head = nana::filesystem::path_user().native();
|
auto head = nana::experimental::filesystem::path_user().native();
|
||||||
if(path.size() >= head.size() && (path.substr(0, head.size()) == head))
|
if(path.size() >= head.size() && (path.substr(0, head.size()) == head))
|
||||||
{//This is HOME
|
{//This is HOME
|
||||||
path_.caption("HOME");
|
path_.caption("HOME");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user