   Windows API - file system
  Where is the windows API for working with the filesystem? I'm pretty sure there must be some API functions for these but I can't find an documentation at all on the subject...-Getting the contents of a folder-Getting the attributes of a file\folder-Checking if a given file\folder exists-Getting the details of a file (size, last modified, etc)-Creating, copying, moving, deleteing and recycling, files and folders-Lots of other stuff that you can do with an explorer window (access files over ftp for example?)I know alot of this can be done with boost or other libaries but theres got to be some underlying windows API?   
File Systems;  Here's a start...File I/O FunctionsThis is a link from MSDN, so it should serve ALL your needs.;  Thanks.Ok I'm trying to put together a function to build a directory tree to learn how some of the stuff works. The problem is it's picking up files as well as directories which I think may also be reponsible for a never ending loop when including sub dirs...   HANDLE FirstDir(const std::string &Search, void*FileData){return FindFirstFileEx(Search.c_str(),FindExInfoStandard,FileData,FindExSearchLimitToDirectories,//shouldn't this stop files being found???NULL,NULL);}bool NextItem(HANDLE Handle, _WIN32_FIND_DATAA* FileData){return FindNextFile(Handle, FileData) ? true : false;}bool DirectoryGetDirectories(std::vector<std::string> *Vector, std::string Directory, bool SubDirs){//if(Directory == "")Directory = fw::DirectoryWorking;std::set   <std::string> ToSearch;if(Directory == "")ToSearch.insert(Directory);elseToSearch.insert(Directory + '\\');WIN32_FIND_DATA FindFileData;while(!ToSearch.empty()){std::string CurrentDirectory = *ToSearch.begin();HANDLE search = FirstDir(CurrentDirectory + "*", &FindFileData);do{if( FindFileData.cFileName == std::string(".") ||FindFileData.cFileName == std::string(".."))continue;std::string Dir = CurrentDirectory + FindFileData.cFileName;Vector->push_back(Dir);//only add to search list if checking subdirsif(SubDirs)ToSearch.insert(Dir + '\\');}FindClose(search);ToSearch.erase(CurrentDirectory);}return true;} [Edited by - Sync Views on June 6, 2008 4:49:42 AM];  Ok ive got that working. Just two things I can't work out:1- What is the correct way to check if a file/folder exists?2- How do I rename a file/folder. I really don't think making anew one then deleting the origenal is the correct way...   ;Quote:Original post by Sync ViewsOk ive got that working. Just two things I can't work out:1- What is the correct way to check if a file/folder exists?2- How do I rename a file/folder. I really don't think making anew one then deleting the origenal is the correct way...1) Take a look at the FindFirstFile function. http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx. If it returns INVALID_HANDLE_VALUE (-1) then most likely the file you are looking for does not exist. You can make sure by calling the GetLastError function. Take a look at their example on that page.2) Use the MoveFile function: http://msdn.microsoft.com/en-us/library/aa365239.aspx   MoveFile("OldFilename", "NewFilename");   