tempdir
tempdir
Creates a temporary directory.
Installation
- Add the dependency to your
shard.yml
:
dependencies:
tempdir:
github: lugia-kun/tempdir
- Run
shards install
Usage
require "tempdir"
Dir.mktmpdir
dir = Dir.mktmpdir(*args)
Creates a temporary directory. Given arguments are not checked by here, this method passes them to File.tmpname
as-is. See File.tempname
.
The returning object is Tempdir
. It removes all entries when #close
-d.
With block, the created directory will be removed after block is left.
Dir.mktmpdir(...) do |dir|
# work with dir
end
Tempdir
The temporary directory class based on Dir
.
This class only rewrite #close
method to remove entries in the directory.
Development
There is no special instructions about this library.
The crystal-lang/crystal's development rules and policies would be apply.
Contributing
- Fork it (https://github.com/lugia-kun/tempdir.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Hajime Yoshimori - creator and maintainer
Repository
tempdir
Owner
Statistic
- 1
- 1
- 0
- 1
- 0
- over 3 years ago
- February 3, 2019
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 16:45:50 GMT
Languages