zoukankan      html  css  js  c++  java
  • 遍历文件

    void listFiles()

    {

        namespace  fs  =  boost::filesystem;

        boost::filesystem::path path=boost::filesystem::current_path();

        fs::directory_iterator item_begin(path);

        fs::directory_iterator item_end;

        for ( ;item_begin   !=  item_end; item_begin ++ )

        {

            if (fs::is_directory( * item_begin))

            {

                std::cout  << item_begin -> path() << " /t[dir] " << std::endl;

                    //  PrintAllFile( * item_begin);

            }

            else

            {

                std::cout  << item_begin -> path()<< std::endl;

            }

        }

  • 相关阅读:
    Shell IFS
    Crontab
    linux awk
    free
    条件语句练习2
    条件语句练习
    打印菜单
    条件测试语法
    read 命令
    jQuery(实例)
  • 原文地址:https://www.cnblogs.com/gujianhan/p/3702043.html
Copyright © 2011-2022 走看看