{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/25535","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/25535/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/25535/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/25535/events","html_url":"https://github.com/dotnet/corefx/issues/25535","id":277233208,"number":25535,"title":"Add overload to Path.GetFullPath() to specify base path","user":{"login":"JeremyKuhne","id":8184940,"avatar_url":"https://avatars3.githubusercontent.com/u/8184940?v=4","gravatar_id":"","url":"https://api.github.com/users/JeremyKuhne","html_url":"https://github.com/JeremyKuhne","followers_url":"https://api.github.com/users/JeremyKuhne/followers","following_url":"https://api.github.com/users/JeremyKuhne/following{/other_user}","gists_url":"https://api.github.com/users/JeremyKuhne/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyKuhne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyKuhne/subscriptions","organizations_url":"https://api.github.com/users/JeremyKuhne/orgs","repos_url":"https://api.github.com/users/JeremyKuhne/repos","events_url":"https://api.github.com/users/JeremyKuhne/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyKuhne/received_events","type":"User","site_admin":false},"labels":[{"id":163655927,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-approved","name":"api-approved","color":"159818","default":false},{"id":154422420,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.IO","name":"area-System.IO","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"Anipik","id":10516582,"avatar_url":"https://avatars1.githubusercontent.com/u/10516582?v=4","gravatar_id":"","url":"https://api.github.com/users/Anipik","html_url":"https://github.com/Anipik","followers_url":"https://api.github.com/users/Anipik/followers","following_url":"https://api.github.com/users/Anipik/following{/other_user}","gists_url":"https://api.github.com/users/Anipik/gists{/gist_id}","starred_url":"https://api.github.com/users/Anipik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anipik/subscriptions","organizations_url":"https://api.github.com/users/Anipik/orgs","repos_url":"https://api.github.com/users/Anipik/repos","events_url":"https://api.github.com/users/Anipik/events{/privacy}","received_events_url":"https://api.github.com/users/Anipik/received_events","type":"User","site_admin":false},"assignees":[{"login":"Anipik","id":10516582,"avatar_url":"https://avatars1.githubusercontent.com/u/10516582?v=4","gravatar_id":"","url":"https://api.github.com/users/Anipik","html_url":"https://github.com/Anipik","followers_url":"https://api.github.com/users/Anipik/followers","following_url":"https://api.github.com/users/Anipik/following{/other_user}","gists_url":"https://api.github.com/users/Anipik/gists{/gist_id}","starred_url":"https://api.github.com/users/Anipik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anipik/subscriptions","organizations_url":"https://api.github.com/users/Anipik/orgs","repos_url":"https://api.github.com/users/Anipik/repos","events_url":"https://api.github.com/users/Anipik/events{/privacy}","received_events_url":"https://api.github.com/users/Anipik/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/12","html_url":"https://github.com/dotnet/corefx/milestone/12","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/12/labels","id":2323293,"number":12,"title":"2.1.0","description":".NET Core 2.1, next major release. See [official release dates](https://github.com/dotnet/core/blob/master/roadmap.md) for details.","creator":{"login":"karelz","id":5776068,"avatar_url":"https://avatars2.githubusercontent.com/u/5776068?v=4","gravatar_id":"","url":"https://api.github.com/users/karelz","html_url":"https://github.com/karelz","followers_url":"https://api.github.com/users/karelz/followers","following_url":"https://api.github.com/users/karelz/following{/other_user}","gists_url":"https://api.github.com/users/karelz/gists{/gist_id}","starred_url":"https://api.github.com/users/karelz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karelz/subscriptions","organizations_url":"https://api.github.com/users/karelz/orgs","repos_url":"https://api.github.com/users/karelz/repos","events_url":"https://api.github.com/users/karelz/events{/privacy}","received_events_url":"https://api.github.com/users/karelz/received_events","type":"User","site_admin":false},"open_issues":378,"closed_issues":3889,"state":"open","created_at":"2017-02-15T02:14:11Z","updated_at":"2017-12-15T16:18:10Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-11-28T02:05:07Z","updated_at":"2017-12-15T20:16:21Z","closed_at":null,"author_association":"MEMBER","body":"We should add an overload that allows specifying the base path to resolve against if the given `path` isn't fully qualified.\r\n\r\n## Rationale and Usage\r\n\r\nResolving partially qualified paths (paths that are relative to the current directory) is error prone as it depends on the process-wide state of the current working directory. Allowing users to specify a virtual \"working directory\" will avoid many common errors caused by setting the current directory to resolve paths \"correctly\".\r\n\r\n``` C#\r\nforeach (string file in sourceFiles)\r\n{\r\n    resolvedSources.Add(Path.GetFullPath(file, projectRoot));\r\n}\r\n```\r\n\r\n## Proposed API\r\n\r\n``` C#\r\nnamespace System.IO\r\n{\r\n    public static class Path\r\n    {\r\n        public static string GetFullPath(string path, string basePath);\r\n    }\r\n}\r\n```\r\n\r\n## Implementation Notes\r\n\r\n- `basePath` will throw ArgumentNullException if null.\r\n- `basePath` will throw ArgumentException if it does not meet `Path.IsPathFullyQualified()`. \r\n- If `path` does not meet `Path.IsPathFullyQualified()`, it will be combined with the `basePath` before resolving.\r\n- If the given path is drive relative on Windows (`C:foo`) we will combine with the `basePath` **if** the drive matches. If it does not, we will assume it is meant to be at the root of the specified drive. (Option: we could throw in this case...)\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/352101365","html_url":"https://github.com/dotnet/corefx/issues/25535#issuecomment-352101365","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/25535","id":352101365,"user":{"login":"Anipik","id":10516582,"avatar_url":"https://avatars1.githubusercontent.com/u/10516582?v=4","gravatar_id":"","url":"https://api.github.com/users/Anipik","html_url":"https://github.com/Anipik","followers_url":"https://api.github.com/users/Anipik/followers","following_url":"https://api.github.com/users/Anipik/following{/other_user}","gists_url":"https://api.github.com/users/Anipik/gists{/gist_id}","starred_url":"https://api.github.com/users/Anipik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anipik/subscriptions","organizations_url":"https://api.github.com/users/Anipik/orgs","repos_url":"https://api.github.com/users/Anipik/repos","events_url":"https://api.github.com/users/Anipik/events{/privacy}","received_events_url":"https://api.github.com/users/Anipik/received_events","type":"User","site_admin":false},"created_at":"2017-12-15T20:16:21Z","updated_at":"2017-12-15T20:16:21Z","author_association":"MEMBER","body":"Can somebody give an example of how api should work in case of device paths (1  & 2 case)"}}
{"actor":{"display_login":"Anipik"}}