// validation -- not prohibited move of public folder
if (!validateNotRestrictedFolder(selectedFiles, "renamed"))
return ;
// prompt for new file name then execute the rename
final FileSystemItem file = selectedFiles.get(0);
globalDisplay_.promptForText("Rename File",
"Please enter the new file name:",
file.getName(),
0,
file.getStem().length(),
null,
new ProgressOperationWithInput<String>() {
public void execute(String input,
final ProgressIndicator progress)
{
progress.onProgress("Renaming file...");
String path = file.getParentPath().completePath(input);
FileSystemItem target ;
if (file.isDirectory())
target = FileSystemItem.createDir(path);
else
target = FileSystemItem.createFile(path);