-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement mkdtemp primitive on Windows (#313)
* Implement mkdtemp primitive on Windows * Windows not in doc * Move libs to fix compile * Another attempt to fix link issues * Fix typo * Skip, not fail the LSP tests on Windows * Do it the way Florian recommended
- Loading branch information
Erik Corry
authored
Jan 18, 2022
1 parent
8265b11
commit adcca9d
Showing
6 changed files
with
135 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (C) 2020 Toitware ApS. All rights reserved. | ||
import expect show * | ||
import host.directory | ||
import host.file | ||
|
||
main: | ||
// Make a temporary directory in the current dir. | ||
tmp_dir := directory.mkdtemp "foo-" | ||
print tmp_dir | ||
expect (file.is_directory tmp_dir) | ||
directory.rmdir tmp_dir | ||
|
||
// Make a temporary directory in the system dir. | ||
tmp_dir = directory.mkdtemp "/tmp/foo-" | ||
print tmp_dir | ||
expect (file.is_directory tmp_dir) | ||
directory.rmdir tmp_dir |