Definition at line 942 of file RawDataSet.h. Referenced by AddFile(), and Init(). 00944 { 00945 StringList sl(src, '/', true); 00946 00947 if (Link::DiskImage::DiskImageUsed()) 00948 { 00949 const String::size_type firstTokenPos = src.find("//#"); 00950 const bool parseDiskImageStyle = (firstTokenPos != String::npos); 00951 if (parseDiskImageStyle) 00952 { 00953 StringList::iterator it = sl.begin(); 00954 section = ""; 00955 // define all until first token as 'section' 00956 while (!it->empty()) 00957 { 00958 if (it != sl.begin()) 00959 section += "/"; 00960 section += *it++; 00961 } 00962 it++; // skip slash that separates section and path 00963 00964 // 'dir' will now start with a token 00965 dir = ""; 00966 while (it != sl.end()) 00967 { 00968 String& next = *it; 00969 it++; 00970 if (it == sl.end()) 00971 file = next; 00972 else 00973 dir += "/" + next; 00974 } 00975 return; 00976 } 00977 } 00978 00979 StringList::reverse_iterator it = sl.rbegin(); 00980 file = *it++; 00981 if (it != sl.rend()) 00982 dir = *it++; 00983 if (it != sl.rend()) 00984 section = *it++; 00985 while (it != sl.rend()) 00986 { 00987 String subDir = *it++; 00988 if (subDir != ".") 00989 section = subDir + "/" + section; 00990 } 00991 }
|