-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to get current user's home directory #498
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
type-enhancement
A request for a change that isn't a bug
Comments
This comment was originally written by drfibonacci@google.com Removed Type-Defect label. |
Removed Area-Library label. |
Environment variables are now accessible from Dart programs and you should be able to get the user's home directory from there. Added Fixed label. |
Removed Area-IO label. |
DartBot
added
Type-Enhancement
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
labels
May 14, 2014
kevmoo
added
type-enhancement
A request for a change that isn't a bug
and removed
type-enhancement
labels
Mar 1, 2016
This was referenced Oct 29, 2020
copybara-service bot
pushed a commit
that referenced
this issue
Dec 14, 2022
Revisions updated by `dart tools/rev_sdk_deps.dart`. browser_launcher (https://github.com/dart-lang/browser_launcher/compare/5fa0bd6..2712dda): 2712dda 2022-12-13 Anna Gringauze Fix internal CI test failures (#35) dartdoc (https://github.com/dart-lang/dartdoc/compare/eb90a44..1f42216): 1f422163 2022-12-13 Sam Rawlins Bump to 6.1.5 (#3274) intl (https://github.com/dart-lang/intl/compare/234b291..6fb07f2): 6fb07f2 2022-12-14 Copybara-Service Merge pull request #520 from dart-lang:revto18 1f9815c 2022-12-14 Moritz Rev version in preparation for publish of 0.18.0 1d37c42 2022-12-13 Googler Internal change 708b85c 2022-12-13 Copybara-Service Merge pull request #498 from dart-lang:remove_intl_stream 2d9eca9 2022-09-28 moritz sort imports 08a35bd 2022-09-28 moritz Merge branch 'master' into remove_intl_stream 0fc6ab9 2022-09-28 moritz Changes as per review 4680742 2022-09-27 moritz rename to stack f687c72 2022-09-27 moritz changes as per review ef36013 2022-09-26 moritz add reference to benchmark 117c0cf 2022-09-26 moritz separate read and pop 434378a 2022-09-26 moritz move method e98c4aa 2022-09-26 moritz fix typo 9234540 2022-09-26 moritz rename file 024cffc 2022-09-26 moritz make it a tad faster c6f7b6a 2022-09-26 moritz some renaming 443c9e0 2022-09-26 moritz Remove StringIterator 1953002 2022-09-23 Nate Bosch Inline the extension 4dfdc1b 2022-09-22 Nate Bosch Simplify the IntlStream class mime (https://github.com/dart-lang/mime/compare/c0c4c47..273d454): 273d454 2022-12-13 tomk9 Add .dcm to extension map (#74) aacec32 2022-12-12 Kevin Moore Update to latest lints, bump min SDK to 2.18 (#77) 536db4f 2022-12-12 Kevin Moore blast_repo fixes (#79) 2343229 2022-12-12 Kevin Moore Add .msj (and change .js) to text/javascript (#76) mockito (https://github.com/dart-lang/mockito/compare/347d3e4..942dd03): 942dd03 2022-12-12 yanok Override `SmartFake.toString` to be super-verbose 5f97a43 2022-12-09 Sam Rawlins Stop using deprecated analyzer APIs 0660e61 2022-12-06 yanok Generate method overrides even then source lib is not null-safe cf7d851 2022-12-06 yanok Add override for `Object.operator==` in `SmartFake` 6b89e99 2022-12-02 yanok Automated g4 rollback of changelist 492410078. d11d010 2022-12-02 yanok Generate method overrides even then source lib is not null-safe sse (https://github.com/dart-lang/sse/compare/d396145..cfa93b1): cfa93b1 2022-12-14 Elliott Brooks (she/her) Add `package:js` to dependencies (#71) 00335e4 2022-12-13 Elliott Brooks (she/her) Update `package:sse` to `4.1.2`(#70) webdev (https://github.com/dart-lang/webdev/compare/3e2364e..317288a): 317288a 2022-12-14 Derek Xu Remove ChromeProxyService.setExceptionPauseMode() (#1820) bbe7143 2022-12-14 Elliott Brooks (she/her) Migrate `events_test.dart` to null-safety (#1819) 1d1c98f 2022-12-14 Elliott Brooks (she/her) Settings page, Dart Debugger panel, and Flutter Inspector panel match DevTools styles (#1815) a9b8887 2022-12-13 Elliott Brooks (she/her) Update tests that are incompatible with `3.0.0` (#1817) Change-Id: I08e555dc22e5577740fe43e91ff31e4601ac15f0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275781 Commit-Queue: Nate Bosch <nbosch@google.com> Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
copybara-service bot
pushed a commit
that referenced
this issue
Feb 8, 2023
dartdoc: 494a6bed 2023-02-02 Sam Rawlins Bump markdown dep to a pre-release of 7.0.0 (#3321) ad6f1612 2023-02-02 Devon Carew introduce an environmentProvider abstraction (#3324) d0b73000 2023-02-02 Sam Rawlins Prepare testing code for some upcoming Warnings (#3322) 936a7888 2023-02-01 Sam Rawlins Add text about front-end manual testing (#3286) cbee812d 2023-02-01 Sam Rawlins Avoid renaming generator params (#3316) bcaa0349 2023-02-01 Sam Rawlins Privatize Library.sdkLib and move getClassByName (#3317) af32def5 2023-01-31 dependabot[bot] Bump github/codeql-action from 2.1.39 to 2.2.1 (#3313) 528e97da 2023-01-31 dependabot[bot] Bump actions/cache from 3.2.3 to 3.2.4 (#3312) 54020672 2023-02-01 Parker Lougheed Begin changelog for next release after 6.1.5 (#3315) markdown: f51c24c 2023-02-01 Zhiguang Chen Prepend a line ending if the p tag is removed and there is an element before it in a *tight* list (#513) dd3e3a1 2023-01-31 dependabot[bot] Bump dart-lang/setup-dart from 1.3 to 1.4 (#510) 5f25fc9 2023-01-31 dependabot[bot] Bump actions/checkout from 3.2.0 to 3.3.0 (#511) 54266b2 2023-01-31 Kevin Moore Prepare to release v7.0.0 (#509) d6ceff9 2023-01-31 Zhiguang Chen Add line endings before HTML blocks (#508) ccd3c8b 2023-01-29 Zhiguang Chen Rewrite link reference definitions (#506) e8f84dc 2023-01-24 Kevin Moore Update GFM to 0.29.0.gfm.7 (#507) 93f67b0 2023-01-20 Zhiguang Chen Add an `enableTagfilter` option to `HtmlRenderer` to eanble GFM `tagfilter` extension (#447) d110770 2023-01-13 Zhiguang Chen Rewrite SetextHeaderSyntax (#500) c1b9bc6 2023-01-09 Sam Rawlins Migrate from no-implicit-casts to strict-casts (#504) 3e78c08 2023-01-01 dependabot[bot] Bump actions/checkout from 3.0.2 to 3.2.0 (#501) 417747f 2022-12-15 Zhiguang Chen Refactor list syntax (#499) 30ec05f 2022-11-29 Zhiguang Chen Do not escape single quote(apostrophe) inside code (#498) c3d1136 2022-11-29 Zhiguang Chen introduce a Line class (#494) Change-Id: I9d971b927b72500ab84cce461a60fe1a86818e2e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281543 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by ladicek@gmail.com
You can already work with files and directories in standalone Dart VM program, but there's no way to get current user's home directory (well, I'm not sure if I can read env vars in Dart program...). That is pretty common operation and I think that it should definitely be available.
I'm attaching a patch (a svn diff, actually) for dart/runtime directory that provides a named constructor "Directory.home()" for this. The implementation is most probably horribly wrong as I am a lousy C programmer (and don't know who is responsible for freeing a C string passed to Dart_NewString), but the approach using named constructor seems solid to me.
If you want me to push the patch into the codereview system, I'll be happy to do so.
Attachment:
dart_homedir.diff (3.70 KB)
The text was updated successfully, but these errors were encountered: