{"action":"opened","issue":{"url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/issues/67","labels_url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/issues/67/comments","events_url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/issues/67/events","html_url":"https://github.com/isandlaTech/cohorte-platforms/issues/67","id":106781007,"number":67,"title":"Allow the user to choose a directory where components can write persistent data","user":{"login":"debbabi","id":522491,"avatar_url":"https://avatars.githubusercontent.com/u/522491?v=3","gravatar_id":"","url":"https://api.github.com/users/debbabi","html_url":"https://github.com/debbabi","followers_url":"https://api.github.com/users/debbabi/followers","following_url":"https://api.github.com/users/debbabi/following{/other_user}","gists_url":"https://api.github.com/users/debbabi/gists{/gist_id}","starred_url":"https://api.github.com/users/debbabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debbabi/subscriptions","organizations_url":"https://api.github.com/users/debbabi/orgs","repos_url":"https://api.github.com/users/debbabi/repos","events_url":"https://api.github.com/users/debbabi/events{/privacy}","received_events_url":"https://api.github.com/users/debbabi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/milestones/2","html_url":"https://github.com/isandlaTech/cohorte-platforms/milestones/1.1.1","labels_url":"https://api.github.com/repos/isandlaTech/cohorte-platforms/milestones/2/labels","id":1269297,"number":2,"title":"1.1.1","description":null,"creator":{"login":"debbabi","id":522491,"avatar_url":"https://avatars.githubusercontent.com/u/522491?v=3","gravatar_id":"","url":"https://api.github.com/users/debbabi","html_url":"https://github.com/debbabi","followers_url":"https://api.github.com/users/debbabi/followers","following_url":"https://api.github.com/users/debbabi/following{/other_user}","gists_url":"https://api.github.com/users/debbabi/gists{/gist_id}","starred_url":"https://api.github.com/users/debbabi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debbabi/subscriptions","organizations_url":"https://api.github.com/users/debbabi/orgs","repos_url":"https://api.github.com/users/debbabi/repos","events_url":"https://api.github.com/users/debbabi/events{/privacy}","received_events_url":"https://api.github.com/users/debbabi/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":6,"state":"open","created_at":"2015-08-24T12:49:00Z","updated_at":"2015-09-16T14:06:44Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-09-16T14:06:44Z","updated_at":"2015-09-16T14:06:44Z","closed_at":null,"body":"When starting a Node, users could provide the path to the storage location:\r\n```\r\n./run --data-dir=/opt/isandlatech/data\r\n```\r\nWhen no storage location is provided, by default Cohorte consider the sub-directory `BASE/data`.\r\n\r\nDevelopers implementing Components could use the Cohorte API to get this storage location.\r\n\r\nIn Python\r\n```python\r\ndata_dir = _context.get_property(cohorte.PROP_NODE_DATA_DIR)\r\n```\r\n\r\nIn Java\r\n```java\r\nimport org.psem2m.isolates.services.dirs.IPlatformDirsSvc;\r\n...\r\n@Requires\r\nprivate IPlatformDirsSvc pPlatformc;\r\n...\r\nFile aDataDir = pPlatform.getNodeDataDir();\r\n```\r\nou\r\n```java\r\n// pContext is a reference to the BundleContext\r\nString aDataDirPath = pContext.getProperty(\"cohorte.node.data.dir\");\r\n```\r\n"}}