{"id":20148323,"url":"https://github.com/nwutils/nw-programmatic-folder-select","last_synced_at":"2025-04-09T19:51:47.462Z","repository":{"id":35044354,"uuid":"200126043","full_name":"nwutils/nw-programmatic-folder-select","owner":"nwutils","description":"Programmatically open a native \"Folder select\" dialog","archived":false,"fork":false,"pushed_at":"2024-01-30T17:11:55.000Z","size":205,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T21:45:58.746Z","etag":null,"topics":["directory-selector","nwjs","programmatically","tool","xpda"],"latest_commit_sha":null,"homepage":"https://nwutils.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-01T22:20:26.000Z","updated_at":"2024-12-22T20:49:56.000Z","dependencies_parsed_at":"2022-08-08T04:01:21.444Z","dependency_job_id":null,"html_url":"https://github.com/nwutils/nw-programmatic-folder-select","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-programmatic-folder-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-programmatic-folder-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-programmatic-folder-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-programmatic-folder-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/nw-programmatic-folder-select/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247968249,"owners_count":21025797,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directory-selector","nwjs","programmatically","tool","xpda"],"created_at":"2024-11-13T22:37:16.484Z","updated_at":"2025-04-09T19:51:47.436Z","avatar_url":"https://github.com/nwutils.png","language":"JavaScript","readme":"# nw-programmatic-folder-select\n\n![Build Status](https://github.com/nwutils/nw-programmatic-folder-select/workflows/Node.js%20CI/badge.svg)\n\nProgrammatically open a native \"Folder select\" dialog in NW.js.\n\nSimilar to `\u003cinput type=\"file\" nwdirectory\u003e` but with just JavaScript.\n\n![Windows Screenshot from NW.js 0.12.3](screenshots/win.png)\n![Windows Screenshot from NW.js 0.40.0](screenshots/win2.png)\n![Ubuntu Screenshot from NW.js 0.40.0](screenshots/ubuntu.png)\n\nCompatible with all versions of NW.js.\n\n**Version** | **Tested**\n:--:        | :--:\nv0.12.3     | :heavy_check_mark:\nv0.14.7     | :heavy_check_mark:\nv0.40.0     | :heavy_check_mark:\nv0.83.0     | :heavy_check_mark:\n\nWorks on all platforms NW.js runs on (Windows, Linux, OSX).\n\n\n## Installation\n\n```\nnpm install --save nw-programmatic-folder-select\n```\n\n\n## Basic Usage\n\n```js\nconst openFolderExplorer = require('nw-programmatic-folder-select');\n// The window object, to have access to the browser context, and a callback function with the user's choice\nopenFolderExplorer(window, (selection) =\u003e { console.log(selection); });\n```\n\n\n## Advanced Usage\n\n```js\nconst openFolderExplorer = require('nw-programmatic-folder-select');\n\nconst options = {\n  // Optional string. The working directory to start in\n  directory: 'C:\\\\',\n  // Optional string. A custom title for the OS's folder selection dialog\n  title: 'Select a folder to store the settings file in'\n};\n\n// Optional asynchronous callback function.\n// Returns a string to the path, like 'C:\\Users\\Bob\\Desktop', or undefined if no selection made\nfunction callback (selection) {\n  if (selection) {\n    console.log('The user chose ' + selection);\n  } else {\n    console.log('The user cancelled the dialog.');\n  }\n}\n\n// Window is required to have access to the browser context\n// All other arguments are optional\nopenFolderExplorer(window, options, callback);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-programmatic-folder-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Fnw-programmatic-folder-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-programmatic-folder-select/lists"}