{"action":"created","issue":{"url":"https://api.github.com/repos/tailhook/openat/issues/7","repository_url":"https://api.github.com/repos/tailhook/openat","labels_url":"https://api.github.com/repos/tailhook/openat/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/tailhook/openat/issues/7/comments","events_url":"https://api.github.com/repos/tailhook/openat/issues/7/events","html_url":"https://github.com/tailhook/openat/issues/7","id":328313821,"node_id":"MDU6SXNzdWUzMjgzMTM4MjE=","number":7,"title":"Dir: please provide open<File> and open<Fd>","user":{"login":"lucab","id":98086,"node_id":"MDQ6VXNlcjk4MDg2","avatar_url":"https://avatars1.githubusercontent.com/u/98086?v=4","gravatar_id":"","url":"https://api.github.com/users/lucab","html_url":"https://github.com/lucab","followers_url":"https://api.github.com/users/lucab/followers","following_url":"https://api.github.com/users/lucab/following{/other_user}","gists_url":"https://api.github.com/users/lucab/gists{/gist_id}","starred_url":"https://api.github.com/users/lucab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucab/subscriptions","organizations_url":"https://api.github.com/users/lucab/orgs","repos_url":"https://api.github.com/users/lucab/repos","events_url":"https://api.github.com/users/lucab/events{/privacy}","received_events_url":"https://api.github.com/users/lucab/received_events","type":"User","site_admin":false},"labels":[{"id":950929801,"node_id":"MDU6TGFiZWw5NTA5Mjk4MDE=","url":"https://api.github.com/repos/tailhook/openat/labels/good%20first%20issue","name":"good first issue","color":"edd942","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-31T22:04:52Z","updated_at":"2018-06-01T08:12:35Z","closed_at":null,"author_association":"NONE","body":"Sometimes I find myself in situations where I only have a pre-opened `RawFd` or `File` handle to a directory. I think it would be helpful to provide here some (fallible) constructors so that I can upgrade those to real `Dir`.\r\n\r\nDid I maybe miss something, and this is already implemented or maybe not feasible at all? Ah, and thanks for this crate!"},"comment":{"url":"https://api.github.com/repos/tailhook/openat/issues/comments/393803481","html_url":"https://github.com/tailhook/openat/issues/7#issuecomment-393803481","issue_url":"https://api.github.com/repos/tailhook/openat/issues/7","id":393803481,"node_id":"MDEyOklzc3VlQ29tbWVudDM5MzgwMzQ4MQ==","user":{"login":"tailhook","id":321799,"node_id":"MDQ6VXNlcjMyMTc5OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/321799?v=4","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T08:12:35Z","updated_at":"2018-06-01T08:12:35Z","author_association":"OWNER","body":"What is a use case of passing unknown file descriptors?\r\n\r\nI mean, you can also pass a directory file descriptor to `File::FromRawFd`, and next read/write will fail, but this has never been an issue, for me at least. Usually, It's the responsibility of a user to do needed check and/or pass right file descriptors.\r\n\r\nThis is also consistent with the current behavior. You can use `Dir::open(\"filename.txt\")` on a file.\r\n\r\nBy the way, you can check fd after creation with `dir.sub_dir(\".\")`, not sure it a good method to recommend, though."}}
{"actor":{"display_login":"tailhook"}}