@@ -771,7 +771,7 @@ void ExplorerDialog::tb_cmd(WPARAM message)
771771 }
772772 newFilePath /= szFileName;
773773
774- if (FileSystemService::Instance (). CreateNewFile (newFilePath.wstring ())) {
774+ if (FileSystemService::CreateNewFile (newFilePath.wstring ())) {
775775 ::SendMessage (_hParent, NPPM_DOOPEN, 0 , (LPARAM)newFilePath.c_str());
776776 }
777777 break ;
@@ -801,7 +801,7 @@ void ExplorerDialog::tb_cmd(WPARAM message)
801801 }
802802 newFolderPath /= szFolderName;
803803
804- if (FileSystemService::Instance (). CreateNewDirectory (newFolderPath.wstring ()) == false ) {
804+ if (FileSystemService::CreateNewDirectory (newFolderPath.wstring ()) == false ) {
805805 ::MessageBox (_hParent, L" Folder couldn't be created." , L" Error" , MB_OK);
806806 }
807807 break ;
@@ -1096,7 +1096,7 @@ BOOL ExplorerDialog::SelectItem(const std::filesystem::path& path)
10961096 WCHAR szLongPath[MAX_PATH] = {};
10971097 std::wstring remotePath;
10981098 /* convert possible net path name and get the full path name for compare */
1099- if (FileSystemService::Instance (). ConvertNetPathName (path.wstring (), remotePath)) {
1099+ if (FileSystemService::ConvertNetPathName (path.wstring (), remotePath)) {
11001100 ::GetLongPathName (remotePath.c_str(), szLongPath, MAX_PATH);
11011101 }
11021102 else {
@@ -1347,7 +1347,7 @@ void ExplorerDialog::onDelete(bool immediate)
13471347 path.pop_back ();
13481348 }
13491349
1350- FileSystemService::Instance (). DeleteFiles (_hParent, { path }, immediate);
1350+ FileSystemService::DeleteFiles (_hParent, { path }, immediate);
13511351}
13521352
13531353void ExplorerDialog::onCut ()
@@ -1405,7 +1405,7 @@ void ExplorerDialog::onPaste()
14051405 */
14061406void ExplorerDialog::UpdateRoots ()
14071407{
1408- auto drives = FileSystemService::Instance (). GetLogicalDrives ();
1408+ auto drives = FileSystemService::GetLogicalDrives ();
14091409
14101410 HTREEITEM hCurrentItem = _hTreeCtrl.GetNextItem (TVI_ROOT, TVGN_CHILD);
14111411
@@ -1417,13 +1417,13 @@ void ExplorerDialog::UpdateRoots()
14171417 auto it = std::find (drives.begin (), drives.end (), drivePath);
14181418
14191419 if (it != drives.end ()) {
1420- auto volumeInfo = FileSystemService::Instance (). GetVolumeName (drivePath);
1420+ auto volumeInfo = FileSystemService::GetVolumeName (drivePath);
14211421 std::wstring volumeName = std::format (L" {}:" , driveLetter);
14221422 bool haveChildren = false ;
14231423
14241424 if (volumeInfo) {
14251425 volumeName = std::format (L" {}: [{}]" , driveLetter, *volumeInfo);
1426- haveChildren = FileSystemService::Instance (). HaveChildren (drivePath, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
1426+ haveChildren = FileSystemService::HaveChildren (drivePath, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
14271427 }
14281428
14291429 if (hCurrentItem != nullptr ) {
@@ -1522,7 +1522,7 @@ HTREEITEM ExplorerDialog::InsertChildFolder(const std::wstring& childFolderName,
15221522 /* look if children test id allowed */
15231523 BOOL haveChildren = FALSE ;
15241524 if (bChildrenTest == TRUE ) {
1525- haveChildren = FileSystemService::Instance (). HaveChildren (path, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
1525+ haveChildren = FileSystemService::HaveChildren (path, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
15261526 }
15271527
15281528 /* insert item */
@@ -1565,7 +1565,7 @@ void ExplorerDialog::UpdateChildren(const std::wstring& path, HTREEITEM parentIt
15651565 return ;
15661566 }
15671567
1568- auto entries = FileSystemService::Instance (). GetDirectoryEntries (path, _pSettings->IsShowHidden ());
1568+ auto entries = FileSystemService::GetDirectoryEntries (path, _pSettings->IsShowHidden ());
15691569
15701570 if (!entries.empty ()) {
15711571 std::vector<FileSystemEntry> folders;
@@ -1621,7 +1621,7 @@ void ExplorerDialog::UpdateChildren(const std::wstring& path, HTREEITEM parentIt
16211621
16221622 /* update icons and expandable information */
16231623 std::wstring currentPath = GetPath (hCurrentItem);
1624- BOOL haveChildren = FileSystemService::Instance (). HaveChildren (currentPath, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
1624+ BOOL haveChildren = FileSystemService::HaveChildren (currentPath, _pSettings->IsUseFullTree (), _pSettings->IsShowHidden ());
16251625
16261626 /* get icons and update item */
16271627 INT iIconNormal = 0 ;
@@ -1660,7 +1660,7 @@ void ExplorerDialog::FetchChildren(HTREEITEM parentItem)
16601660{
16611661 auto parentFolderPath = GetPath (parentItem);
16621662
1663- auto entries = FileSystemService::Instance (). GetDirectoryEntries (parentFolderPath, _pSettings->IsShowHidden ());
1663+ auto entries = FileSystemService::GetDirectoryEntries (parentFolderPath, _pSettings->IsShowHidden ());
16641664
16651665 if (!entries.empty ()) {
16661666 std::vector<FileSystemEntry> folders;
@@ -2068,7 +2068,7 @@ void ExplorerDialog::Open(const std::wstring &path)
20682068
20692069 /* open possible link */
20702070 std::wstring resolvedPath;
2071- if (FileSystemService::Instance (). ResolveShortCut (filePath, resolvedPath)) {
2071+ if (FileSystemService::ResolveShortCut (filePath, resolvedPath)) {
20722072 if (::PathIsDirectory (resolvedPath.c_str ()) != FALSE ) {
20732073 SelectItem (resolvedPath);
20742074 }
0 commit comments