FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How to fetch the list of folders from a given folder?





sambhav
How to fetch the list of folders from a given folder in C++?
Indi
There is no way in standard C++ to do this... yet.

However, i recommend Boost.Filesystem. It is simple, sexy, portable and powerful, and will very likely be part of a future standard.

To get the list of folders in a folder using Boost.Filesystem:
Code:
typedef boost::filesystem::path path_type; // to save typing

std::vector<path_type> get_child_folders(path_type const& p)
{
  typedef boost::filesystem::basic_directory_iterator<path_type> iter; // to save typing
 
  std::vector<path_type> folders;
 
  for (iter i = iter(p); i != iter(); ++i)
    if (is_directory(i->status()))
      folders.push_back(*i);
 
  return folders;
}
Related topics
Uploading Folders using CPanel
www.porn.xxx
uploading files through web browser
Windows File System Explained
Invisible folder!!!!!
.htaccess problem
Dreamweaver or Golive?
Do not understand the Direct Admin. HELP!!
help me i'm stupid
New Year Resolutions: Do They Work?
Some useful DVD converter Software Free Download
Windows 7 desktop gadgets
editing webpages (.php or .html) without database/cms?
Last show you went to was....
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.