public void MoveScript(MovePageRequest r) { string fromPath = Path.Combine(_paths.UIRoot, r.TenantCode, "app", r.FromPath + ".ts"); string toPath = Path.Combine(_paths.UIRoot, r.TenantCode, "app", r.ToPath + ".ts"); if (File.Exists(fromPath)) { Utils.CreateFolderForFile(toPath); File.Move(fromPath, toPath); } }
public void MoveHtmlTemplate(MovePageRequest r) { string fromPath = _names.GetComponentFilePath(r.TenantCode, r.FromPath) + ".html"; string toPath = _names.GetComponentFilePath(r.TenantCode, r.ToPath) + ".html"; if (File.Exists(fromPath)) { Utils.CreateFolderForFile(toPath); File.Move(fromPath, toPath); } }