久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='Pe3wL'></bdo><ul id='Pe3wL'></ul>
  1. <i id='Pe3wL'><tr id='Pe3wL'><dt id='Pe3wL'><q id='Pe3wL'><span id='Pe3wL'><b id='Pe3wL'><form id='Pe3wL'><ins id='Pe3wL'></ins><ul id='Pe3wL'></ul><sub id='Pe3wL'></sub></form><legend id='Pe3wL'></legend><bdo id='Pe3wL'><pre id='Pe3wL'><center id='Pe3wL'></center></pre></bdo></b><th id='Pe3wL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Pe3wL'><tfoot id='Pe3wL'></tfoot><dl id='Pe3wL'><fieldset id='Pe3wL'></fieldset></dl></div>
      <legend id='Pe3wL'><style id='Pe3wL'><dir id='Pe3wL'><q id='Pe3wL'></q></dir></style></legend>
      <tfoot id='Pe3wL'></tfoot>
    1. <small id='Pe3wL'></small><noframes id='Pe3wL'>

    2. 如何在 Win32 中遞歸創(chuàng)建文件夾?

      How do I recursively create a folder in Win32?(如何在 Win32 中遞歸創(chuàng)建文件夾?)
          <tfoot id='11afs'></tfoot>
            <tbody id='11afs'></tbody>
            <legend id='11afs'><style id='11afs'><dir id='11afs'><q id='11afs'></q></dir></style></legend>
            <i id='11afs'><tr id='11afs'><dt id='11afs'><q id='11afs'><span id='11afs'><b id='11afs'><form id='11afs'><ins id='11afs'></ins><ul id='11afs'></ul><sub id='11afs'></sub></form><legend id='11afs'></legend><bdo id='11afs'><pre id='11afs'><center id='11afs'></center></pre></bdo></b><th id='11afs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='11afs'><tfoot id='11afs'></tfoot><dl id='11afs'><fieldset id='11afs'></fieldset></dl></div>
            • <bdo id='11afs'></bdo><ul id='11afs'></ul>
              • <small id='11afs'></small><noframes id='11afs'>

                本文介紹了如何在 Win32 中遞歸創(chuàng)建文件夾?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在嘗試創(chuàng)建一個函數,該函數采用目錄名稱(C:fooar..fooar..az\someserverfooar),并根據需要創(chuàng)建目錄,以便創(chuàng)建整個路徑.

                I'm trying to create a function that takes the name of a directory (C:fooar, or ..fooar..az, or \someserverfooar), and creates directories as necessary so that the whole path is created.

                我自己正在嘗試一個非常幼稚的實現,這似乎是一個字符串處理的噩夢.有 / vs ,有一種以 \ 開頭的網絡共享的特殊情況(你也不能嘗試 mkdir() 路徑的前兩級是機器名和共享名),并且有 . 類型的廢話可以存在于路徑中.

                I am attempting a pretty naive implementation of this myself and it seems to be a string processing nightmare. There is / vs , there is the special case of network shares which begin with \ (also you can't attempt to mkdir() the first two levels of the path which are machine name and share name), and there is . type nonsense that can exist in a path.

                在 C++ 中是否有一種簡單的方法可以做到這一點?

                Does there exist a simple way to do this in C++?

                推薦答案

                如果您不需要支持 Windows 2000 之前的 Windows 版本,您可以使用 SHCreateDirectoryEx 函數.考慮一下:

                If you don't need to support Windows versions prior to Windows 2000, you can use the SHCreateDirectoryEx function for this. Consider this:

                int createDirectoryRecursively( LPCTSTR path )
                {
                    return SHCreateDirectoryEx( NULL, path, NULL );
                }
                
                // ...
                if ( createDirectoryRecursively( T("C:\Foo\Bar\Baz") ) == ERROR_SUCCESS ) {
                   // Bingo!
                } 
                

                如果使用這樣的 shell32.dll API 成為問題,您總是可以使用其他東西(可能是手動循環(huán))重新實現上面的 createDirectoryRecursively 函數.

                In case using such shell32.dll API ever becomes an issue, you can always reimplement the createDirectoryRecursively function above with something else (possibly a hand-wired loop).

                這篇關于如何在 Win32 中遞歸創(chuàng)建文件夾?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                Scope of exception object in C++(C++中異常對象的范圍)
                Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區(qū)別)

                <small id='EyOpN'></small><noframes id='EyOpN'>

                      • <bdo id='EyOpN'></bdo><ul id='EyOpN'></ul>
                          <tbody id='EyOpN'></tbody>
                          <legend id='EyOpN'><style id='EyOpN'><dir id='EyOpN'><q id='EyOpN'></q></dir></style></legend>
                          <i id='EyOpN'><tr id='EyOpN'><dt id='EyOpN'><q id='EyOpN'><span id='EyOpN'><b id='EyOpN'><form id='EyOpN'><ins id='EyOpN'></ins><ul id='EyOpN'></ul><sub id='EyOpN'></sub></form><legend id='EyOpN'></legend><bdo id='EyOpN'><pre id='EyOpN'><center id='EyOpN'></center></pre></bdo></b><th id='EyOpN'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EyOpN'><tfoot id='EyOpN'></tfoot><dl id='EyOpN'><fieldset id='EyOpN'></fieldset></dl></div>

                          <tfoot id='EyOpN'></tfoot>
                          主站蜘蛛池模板: 五月婷婷色 | 日本欧美在线 | 精品亚洲一区二区三区 | 偷拍自拍在线观看 | 草草视频在线免费观看 | 日本一二三区电影 | 国产成人精品久久二区二区 | ww 255hh 在线观看 | 日本在线黄色 | 色片在线观看 | 视频一区二区在线观看 | 欧美一级在线免费观看 | 日韩一级二级片 | 在线视频91 | 插插插干干干 | 毛片高清| 国产第一页在线观看 | 国产精品美女视频 | 国产精品一区二区久久久久 | 在线永久看片免费的视频 | 精品视频久久久 | 久久国产精品91 | 欧美一区二区三区视频在线播放 | 久久不射电影网 | 久久大陆 | 亚洲综合色视频在线观看 | 国产精品毛片无码 | 9久久 | 亚洲视频观看 | 羞羞视频在线观看免费观看 | 成人网在线观看 | 免费视频二区 | 欧美一级视频在线观看 | 日本黄色高清视频 | 精品久久久久一区二区国产 | 请别相信他免费喜剧电影在线观看 | 999热精品视频 | 91国产视频在线 | 97狠狠干| 亚洲综合在线一区二区 | 成人精品免费 |