private static GetNewPath ( Node container, string defaultName, int index, string &newName ) : string | ||
container | Node | |
defaultName | string | |
index | int | |
newName | string | |
return | string |
private static string GetNewPath(Node container, string defaultName, int index, out string newName)
{
var ext = Path.GetExtension(defaultName);
var fileName = Path.GetFileNameWithoutExtension(defaultName);
newName = index == 0 ? defaultName : String.Format("{0}({1}){2}", fileName, index, ext);
return RepositoryPath.Combine(container.Path, newName);
}
public static string IncrementNameSuffixToLastName(string currentName, int parentNodeId)