{"action":"created","issue":{"url":"https://api.github.com/repos/fgenesis/ttvfs/issues/8","labels_url":"https://api.github.com/repos/fgenesis/ttvfs/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/fgenesis/ttvfs/issues/8/comments","events_url":"https://api.github.com/repos/fgenesis/ttvfs/issues/8/events","html_url":"https://github.com/fgenesis/ttvfs/issues/8","id":101817845,"number":8,"title":"How can I get the parent of a directory?","user":{"login":"glacjay","id":292719,"avatar_url":"https://avatars.githubusercontent.com/u/292719?v=3","gravatar_id":"","url":"https://api.github.com/users/glacjay","html_url":"https://github.com/glacjay","followers_url":"https://api.github.com/users/glacjay/followers","following_url":"https://api.github.com/users/glacjay/following{/other_user}","gists_url":"https://api.github.com/users/glacjay/gists{/gist_id}","starred_url":"https://api.github.com/users/glacjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glacjay/subscriptions","organizations_url":"https://api.github.com/users/glacjay/orgs","repos_url":"https://api.github.com/users/glacjay/repos","events_url":"https://api.github.com/users/glacjay/events{/privacy}","received_events_url":"https://api.github.com/users/glacjay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-19T06:39:11Z","updated_at":"2015-08-19T10:23:16Z","closed_at":null,"body":"I've not found the API."},"comment":{"url":"https://api.github.com/repos/fgenesis/ttvfs/issues/comments/132531068","html_url":"https://github.com/fgenesis/ttvfs/issues/8#issuecomment-132531068","issue_url":"https://api.github.com/repos/fgenesis/ttvfs/issues/8","id":132531068,"user":{"login":"fgenesis","id":29786,"avatar_url":"https://avatars.githubusercontent.com/u/29786?v=3","gravatar_id":"","url":"https://api.github.com/users/fgenesis","html_url":"https://github.com/fgenesis","followers_url":"https://api.github.com/users/fgenesis/followers","following_url":"https://api.github.com/users/fgenesis/following{/other_user}","gists_url":"https://api.github.com/users/fgenesis/gists{/gist_id}","starred_url":"https://api.github.com/users/fgenesis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgenesis/subscriptions","organizations_url":"https://api.github.com/users/fgenesis/orgs","repos_url":"https://api.github.com/users/fgenesis/repos","events_url":"https://api.github.com/users/fgenesis/events{/privacy}","received_events_url":"https://api.github.com/users/fgenesis/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T10:23:16Z","updated_at":"2015-08-19T10:23:16Z","body":"Consider something like this instead:\r\n\r\n```\r\nVFSDir *d = root.GetDir(\"path/to/thing\");\r\nstd::string s= d->name();\r\nStripLastPath(s);\r\nVFSDir *parent = root.GetDir(s);\r\n```\r\n\r\nWhile you can't go backwards, you can always get the internal (or complete, which would be fullname()) path name in the tree, chop off the last part, and retrieve that directory (which is effectively the parent).\r\nHope this helps."}}