/// <summary> /// Gets the mapped path /// </summary> /// <param name="prj">The active project</param> /// <param name="relativePath">The relative path to the mapped directory</param> /// <returns>The mapped path</returns> public static RelativeMappedPath GetMappedPath(Project prj, String relativePath) { String remotePath = ValidatePath(prj.Connection.Data.RootDir, false), localPath = ValidatePath(prj.Data.ProjectCopy, true); RelativeMappedPath pth = new RelativeMappedPath(remotePath, localPath); pth.RemotePath = relativePath; pth.ProjectCopy = relativePath.Replace('/', '\\'); pth.ServerCopy = Path.Combine(".ssh", "ServerCopy", relativePath.Replace('/', '\\')); pth.LocalVersion = DateTime.Now; pth.RemoteVersion = DateTime.Now; return(pth); }
/// <summary> /// Maps a directory relative to the project file, /// using as base path the project path /// </summary> /// <param name="prj">The active project</param> /// <param name="localPath">The relative path using simple slash as separator</param> private void MapDirectoryRelativePath(Project prj, string pth) { RelativeMappedPath path = MappingUtils.GetMappedPath(prj, pth); this.MapDirectory(prj, path); }