mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
New option to show/hide hidden files
This commit is contained in:
parent
40496dd76a
commit
db0a71fc58
13 changed files with 63 additions and 10 deletions
|
@ -68,6 +68,7 @@ struct DirAccessWindowsPrivate {
|
|||
bool DirAccessWindows::list_dir_begin() {
|
||||
|
||||
_cisdir=false;
|
||||
_cishidden=false;
|
||||
|
||||
if (unicode) {
|
||||
list_dir_end();
|
||||
|
@ -95,6 +96,8 @@ String DirAccessWindows::get_next() {
|
|||
if (unicode) {
|
||||
|
||||
_cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
||||
_cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
|
||||
|
||||
String name=p->fu.cFileName;
|
||||
|
||||
if (FindNextFileW(p->h, &p->fu) == 0) {
|
||||
|
@ -108,6 +111,7 @@ String DirAccessWindows::get_next() {
|
|||
|
||||
#ifndef WINRT_ENABLED
|
||||
_cisdir=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
|
||||
_cishidden=(p->fu.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
|
||||
|
||||
String name=p->f.cFileName;
|
||||
|
||||
|
@ -128,6 +132,11 @@ bool DirAccessWindows::current_is_dir() const {
|
|||
return _cisdir;
|
||||
}
|
||||
|
||||
bool DirAccessWindows::current_is_hidden() const {
|
||||
|
||||
return _cishidden;
|
||||
}
|
||||
|
||||
void DirAccessWindows::list_dir_end() {
|
||||
|
||||
if (p->h!=INVALID_HANDLE_VALUE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue