wxString PHPFolder::GetFullPath(const wxString& projectPath, bool includeDots) const { wxString relPath = GetPathRelativeToProject(false); wxString path; path << projectPath << wxFILE_SEP_PATH << relPath; wxFileName fnPath(path, wxEmptyString); if(!includeDots) { fnPath.Normalize(wxPATH_NORM_DOTS); } return fnPath.GetPath(); }
wxDirTraverseResult CDirList::OnFile(const wxString& filename) { wxFileName fn(filename); wxString sInputPath = fn.GetPath(wxPATH_GET_VOLUME); // chop off file name to get input path if((sInputPath != m_sLastDir) && fn.IsFileReadable() && !Find(sInputPath) ) { wxString sOut(m_sDirOutput); m_sLastDir = sInputPath; wxFileName fnPath(sInputPath); wxString sPath = fnPath.GetPath(wxPATH_GET_VOLUME); // chop off last directory for output path if(sPath.StartsWith(m_sDirInputBase)) { sOut.Append(sPath.Mid(m_sDirInputBase.Len())); } AddEntry(sInputPath,sOut); m_setDirs.insert(sInputPath); } return wxDIR_CONTINUE; }