version 1.19, 2001/04/29 06:26:23
|
version 1.21, 2001/05/06 00:09:12
|
|
|
if (!*p) | if (!*p) |
return p; | return p; |
| |
char* last = p + path.getLength() - 1; |
char* last = p + path.size() - 1; |
| |
if (*last == '/') | if (*last == '/') |
*last = '\0'; | *last = '\0'; |
|
|
dirPath = "."; | dirPath = "."; |
} | } |
| |
|
|
for (Dir dir(dirPath); dir.more(); dir.next()) | for (Dir dir(dirPath); dir.more(); dir.next()) |
{ | { |
if (CompareIgnoreCase(fileName, dir.getName()) == 0) | if (CompareIgnoreCase(fileName, dir.getName()) == 0) |
|
|
| |
// for files-in-directory, delete or recall removedir | // for files-in-directory, delete or recall removedir |
| |
for (Uint32 i = 0, n = fileList.getSize(); i < n; i++) |
for (Uint32 i = 0, n = fileList.size(); i < n; i++) |
{ | { |
String newPath = path; // extend path to subdir | String newPath = path; // extend path to subdir |
newPath.append("/"); | newPath.append("/"); |
|
|
| |
void FileSystem::translateSlashes(String& path) | void FileSystem::translateSlashes(String& path) |
{ | { |
for (Uint32 i = 0, n = path.getLength(); i < n; i++) |
for (Uint32 i = 0, n = path.size(); i < n; i++) |
{ | { |
if (path[i] == '\\') | if (path[i] == '\\') |
path[i] = '/'; | path[i] = '/'; |