SkillAgentSearch skills...

FileSupport

functions for traverse subfolders and subfiles, counting how many lines are there in a file

Install / Use

/learn @wjgaas/FileSupport
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

FileSupport

functions for traverse subfolders and subfiles, counting how many lines are there in a file

###Functions


    typedef std::string String;

    typedef std::vector<String> FileList;

    typedef std::vector<String> FolderList;

    /**
     * @brief      { list sub level of folder under the path }
     *
     * @param[in]  path  { folder path }
     *
     * @return     { vector of subfolders }
     */
    FolderList list_folders(String path);

    /**
     * @brief      { list files under the path }
     *
     * @param[in]  path  { folder path }
     *
     * @return     { vector of subfiles }
     */
    FileList list_files(String path);

    /**
     * @brief      { list all files under the path recurrently }
     *
     * @param[in]  path   { folder path }
     * @param      files  { vector of all subfiles }
     */
    void list_files_recurrently(String path, FileList &files);

    /**
     * @brief      { count the lines of a file }
     *
     * @param[in]  filename  { path of file }
     *
     * @return     { how many lines }
     */
    int get_file_line_num(String filename);
    
View on GitHub
GitHub Stars13
CategoryCustomer
Updated3y ago
Forks0

Languages

C++

Security Score

60/100

Audited on Nov 16, 2022

No findings