commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
e6ac4af568b931a2d3839924736cdc2ce9c656da
Guillaume Gomez
2021-04-08T15:47:39
Ensure that README code example is up to date
diff --git a/Cargo.toml b/Cargo.toml index 2b008da..2742b3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,5 +35,8 @@ features = [ [target.'cfg(target_os = "redox")'.dependencies] redox_syscall = "0.2" +[dev-dependencies] +doc-comment = "0.3" + [features] nightly = [] diff --git a/src/lib.rs b/src/lib.rs index b...
2
10
0
bd5caeed3f38be364146ec8c7848003af0cc4451
Ingvar Stepanyan
2021-02-02T17:39:20
Fixup for unused vars
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 3abea9a..bbf6cb1 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -115,7 +115,7 @@ pub fn reopen(file: &File, path: &Path) -> io::Result<File> { } #[cfg(all(target_os = "wasi", not(feature = "nightly")))] -pub fn reopen(file: &File, path:...
1
1
1
55ad1e28c7acd97145ba678967bb76a930d2c937
Ingvar Stepanyan
2021-02-02T14:08:41
Extract conditional compilation to function level
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index d6e62e7..3abea9a 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -100,28 +100,28 @@ fn create_unix(dir: &Path) -> io::Result<File> { ) } +#[cfg(any(not(target_os = "wasi"), feature = "nightly"))] pub fn reopen(file: &File, path: &Pa...
1
14
14
e2a55c43d6415b231cd24691ffd0691ecd901e2f
Ingvar Stepanyan
2021-02-01T19:58:14
Add [limited] support for WASI WASI doesn't have a concept of system-wide temporary directory, but at least there is no reason why `new_in` methods with explicit paths should fail. This PR implements support for such methods.
diff --git a/Cargo.toml b/Cargo.toml index 31396a7..2b008da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ cfg-if = "1" rand = "0.8" remove_dir_all = "0.5" -[target.'cfg(unix)'.dependencies] +[target.'cfg(any(unix, target_os = "wasi"))'.dependencies] libc = "0.2.27" [target.'cfg(windows)'.dependenci...
4
39
16
42a96706c4ead2a0314b4ed0aa35432b23185d50
Taiki Endo
2020-12-22T07:26:39
Update redox_syscall to 0.2
diff --git a/Cargo.toml b/Cargo.toml index c969425..8fdde13 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,4 +33,4 @@ features = [ ] [target.'cfg(target_os = "redox")'.dependencies] -redox_syscall = "0.1" +redox_syscall = "0.2"
1
1
1
b3142a158605ba6107644018a578a917ee3f6f54
Taiki Endo
2020-12-22T07:26:29
Update rand to 0.8
diff --git a/Cargo.toml b/Cargo.toml index 56c9265..c969425 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ description = "A library for managing temporary files and directories." [dependencies] cfg-if = "1" -rand = "0.7" +rand = "0.8" remove_dir_all = "0.5" [target.'cfg(unix)'.dependencies]
1
1
1
f177f2d57ac33961e4490affb3316a472ad4c364
Matt Brubeck
2020-10-12T20:24:51
Update to cfg-if 1.0
diff --git a/Cargo.toml b/Cargo.toml index 3b61aea..56c9265 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ repository = "https://github.com/Stebalien/tempfile" description = "A library for managing temporary files and directories." [dependencies] -cfg-if = "0.1" +cfg-if = "1" rand = "0.7" remove_dir_a...
1
1
1
ac6a076c9eac515607ad6df85f4108596660bbdf
Steven Allen
2020-09-26T23:56:19
replace mem::swap with mem::replace
diff --git a/src/file/mod.rs b/src/file/mod.rs index 6422a46..31fdd4b 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -1,4 +1,3 @@ -use std; use std::env; use std::error; use std::ffi::OsStr; @@ -342,8 +341,7 @@ impl TempPath { // Don't drop `self`. We don't want to try deleting the old ...
1
1
3
c74b55a7d3013834f0d011fc4b414a61e1781a39
Robert Collins
2020-08-25T10:53:44
Use more direct code than mem::replace The mem::replace idiom was unneeded, so replace it with more direct code. This fixes the lint issues breaking the build on master.
diff --git a/src/file/mod.rs b/src/file/mod.rs index 42fa423..6422a46 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -178,7 +178,7 @@ impl TempPath { /// ``` pub fn close(mut self) -> io::Result<()> { let result = fs::remove_file(&self.path).with_err_path(|| &self.path); - mem::replace(...
1
3
3
9568f4e95859ba740a1c79b080913571a05b7b0c
Ricardo Mendes
2020-07-03T15:24:50
fix small typo in close() documentation
diff --git a/src/dir.rs b/src/dir.rs index 5c71a7f..d630762 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -326,7 +326,7 @@ impl TempDir { self.path.take().unwrap() } - /// Closes and removes the temporary directory, returing a `Result`. + /// Closes and removes the temporary directory, returning a `...
1
1
1
5d6300e72e0ea8be1932385ffaf70d28fda4e8d8
Randy Barlow
2020-04-18T04:02:27
Fix two typos desctructor → destructor Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
diff --git a/src/dir.rs b/src/dir.rs index ae8a637..5c71a7f 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -20,7 +20,7 @@ use crate::Builder; /// The `tempdir` function creates a directory in the file system /// and returns a [`TempDir`]. /// The directory will be automatically deleted when the `TempDir`s -/// desctruc...
1
2
2
76c171008066bd899a198afe860062137fdc8db4
ConnorSkees
2020-01-20T21:30:38
Change "iff" to "if and only if" and remove apostrophe from "it's"
diff --git a/src/file/mod.rs b/src/file/mod.rs index acd2273..42fa423 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -243,7 +243,7 @@ impl TempPath { } } - /// Persist the temporary file at the target path iff no file exists there. + /// Persist the temporary file at the target path if and ...
1
3
3
4e62862d2758897cf9b19ef75e1bce1ca36de7c2
Philipp Gesang
2019-09-09T09:41:07
Clarify the behavior of persist Addresses issue #110 Add a note that persist() does not quite match the atomic rename pattern that is customary on Linux.
diff --git a/src/file/mod.rs b/src/file/mod.rs index 4f60de7..acd2273 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -189,7 +189,10 @@ impl TempPath { /// If this method fails, it will return `self` in the resulting /// [`PathPersistError`]. /// - /// Note: Temporary files cannot be persisted a...
1
9
3
ccb5cd5a695ead10b30db6c21254b50b4769babd
MaulingMonkey
2019-08-14T21:25:23
Fix NamedTempFile::new() link (mistakenly referred to new_in() instead)
diff --git a/src/file/mod.rs b/src/file/mod.rs index ce70cac..4f60de7 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -584,7 +584,7 @@ impl NamedTempFile { /// /// See [`NamedTempFile::new()`] for details. /// - /// [`NamedTempFile::new()`]: #method.new_in + /// [`NamedTempFile::new()`]: #met...
1
1
1
2dc0f13580fe01996d486d6fbe96e2eaa7f3ae58
Steven Allen
2019-07-01T09:11:59
chore: fix clippy lint
diff --git a/src/lib.rs b/src/lib.rs index 9e085e4..51c2da0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,6 +124,7 @@ )] #![cfg_attr(test, deny(warnings))] #![deny(rust_2018_idioms)] +#![allow(clippy::redundant_field_names)] #[macro_use] extern crate cfg_if;
1
1
0
8d6ab7a0ae681ae98c8a0408c9ed89d6c5cdc51d
Steven Allen
2019-07-01T09:10:33
chore: format
diff --git a/src/lib.rs b/src/lib.rs index a4cb574..9e085e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -143,7 +143,9 @@ mod spooled; mod util; pub use crate::dir::{tempdir, tempdir_in, TempDir}; -pub use crate::file::{tempfile, tempfile_in, NamedTempFile, PathPersistError, PersistError, TempPath}; +pub use crate::...
2
8
2
c3f4b1c0cae42ef6e69b9028cb7fc4a83853c78a
Lzu Tao
2019-07-01T03:13:14
Minor edit to Cargo.toml * Split winapi dependency to new section * Sort fields in [package] section * Sort fields in [dependencies] section
diff --git a/Cargo.toml b/Cargo.toml index 1fda609..3b61aea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,28 +7,30 @@ authors = [ "Ashley Mannix <ashleymannix@live.com.au>", "Jason White <jasonaw0@gmail.com>", ] -edition = "2018" -description = """ -A library for managing temporary files and directories. -""" -...
1
13
11
d8786e61f542932fc055827dbe7187fb8880de80
Lzu Tao
2019-07-01T02:57:45
Transit to 2018 edition
diff --git a/Cargo.toml b/Cargo.toml index 3f0efff..1fda609 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ authors = [ "Ashley Mannix <ashleymannix@live.com.au>", "Jason White <jasonaw0@gmail.com>", ] +edition = "2018" description = """ A library for managing temporary files and directories. """ dif...
7
14
13
728b35612c422235be57971bd43e4ecfafb5fdf4
Lzu Tao
2019-06-30T18:39:36
build: Bump rand to 0.7
diff --git a/Cargo.toml b/Cargo.toml index 00928a6..bb4abc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ license = "MIT/Apache-2.0" exclude = ["/.travis.yml", "/appveyor.yml"] [dependencies] -rand = "0.6" +rand = "0.7" remove_dir_all = "0.5" cfg-if = "0.1"
1
1
1
24e635270e312d1f9432958eae3afe150dd16aa9
Steven Allen
2019-06-30T07:34:13
nit: simplify create
diff --git a/src/lib.rs b/src/lib.rs index 6f817e9..2f4a25c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -441,11 +441,7 @@ impl<'a, 'b> Builder<'a, 'b> { self.prefix, self.suffix, self.random_len, - |path| { - let mut open_options = OpenOptions::new(); - ...
1
1
5
d37fd06c6792dada6af8c4dd2f070c9090ef4982
Steven Allen
2019-06-30T05:53:40
fix: fix a compile error (I made assumptions about why builds were failing)
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index c639138..eec6320 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -51,7 +51,7 @@ fn create_unlinked(path: &Path) -> io::Result<File> { path = &tmp; } - let f = create_named(path)?; + let f = create_named(path, &mut OpenO...
1
1
1
0230ef489b090af3f326783aa4ddcf4a2baa22c5
Steven Allen
2019-06-30T05:50:09
doc: add an example for re-opening named temporary files
diff --git a/src/lib.rs b/src/lib.rs index f4b54ce..6f817e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,6 +50,38 @@ //! # } //! ``` //! +//! Create a named temporary file and open an independent file handle: +//! +//! ``` +//! # extern crate tempfile; +//! use tempfile::NamedTempFile; +//! use std::io::{self, Wr...
1
32
0
2dad31ab75f05a49e4daa1e26e3a2f1be9a41cc2
Xavier Deguillard
2019-06-30T04:43:56
Add an append flag to Builder
diff --git a/src/file/imp/other.rs b/src/file/imp/other.rs index 095ff40..d8a55a7 100644 --- a/src/file/imp/other.rs +++ b/src/file/imp/other.rs @@ -1,4 +1,4 @@ -use std::fs::File; +use std::fs::{File, OpenOptions}; use std::io; use std::path::Path; @@ -9,7 +9,7 @@ fn not_supported<T>() -> io::Result<T> { )) ...
6
60
10
0afffc0c17fcfd8370879fd1e3a723e1d5277dc9
Steven Allen
2019-06-03T18:32:26
docs: clarify the security concerns around named temporary files
diff --git a/src/file/mod.rs b/src/file/mod.rs index ee1c4f2..0526379 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -403,7 +403,63 @@ impl AsRef<OsStr> for TempPath { /// /// # Security /// -/// This variant is *NOT* secure/reliable in the presence of a pathological temporary file cleaner. +/// Most operatin...
2
78
15
585689e1fd7e137c0da07acb32b1c1fa8578c875
Steven Allen
2019-05-19T01:33:01
fix: remove unecessary return
diff --git a/src/util.rs b/src/util.rs index 8431771..42d1eed 100644 --- a/src/util.rs +++ b/src/util.rs @@ -20,7 +20,7 @@ fn tmpname(prefix: &OsStr, suffix: &OsStr, rand_len: usize) -> OsString { .for_each(|b| buf.push(str::from_utf8_unchecked(&[b as u8]))) } buf.push(suffix); - return buf; +...
1
1
1
4e1eb00e8b7f7ab3da13571f624dddda8a9771ad
Steven Allen
2019-05-19T01:32:22
fix: use write_all instead of write when writing spooled data to file
diff --git a/src/spooled.rs b/src/spooled.rs index e576253..093477b 100644 --- a/src/spooled.rs +++ b/src/spooled.rs @@ -1,7 +1,6 @@ use file::tempfile; use std::fs::File; use std::io::{self, Cursor, Read, Seek, SeekFrom, Write}; -use std::mem::drop; #[derive(Debug)] enum SpooledInner { @@ -86,9 +85,8 @@ impl Sp...
1
1
3
b0ef8f8df130727e9ff39c5fddec0846d6e1202d
Steven Allen
2019-05-19T01:26:19
fix: export PathPersistError fixes #25
diff --git a/src/lib.rs b/src/lib.rs index 4160f3c..df04d07 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -122,7 +122,7 @@ mod spooled; mod util; pub use dir::{tempdir, tempdir_in, TempDir}; -pub use file::{tempfile, tempfile_in, NamedTempFile, PersistError, TempPath}; +pub use file::{tempfile, tempfile_in, NamedTemp...
1
1
1
db044252ed65ab41133684c32031f5ed395d1d52
Steven Allen
2019-03-24T00:52:10
implement TempPath::keep fixes #84
diff --git a/src/file/imp/other.rs b/src/file/imp/other.rs index da0bac3..095ff40 100644 --- a/src/file/imp/other.rs +++ b/src/file/imp/other.rs @@ -1,9 +1,12 @@ -use std::path::Path; -use std::io; use std::fs::File; +use std::io; +use std::path::Path; fn not_supported<T>() -> io::Result<T> { - Err(io::Error::ne...
5
146
3
d32fbe2c3bb43723d35132add884f8208e57724b
Jason White
2019-03-23T21:53:21
Add NamedTempFile::into_parts
diff --git a/src/file/mod.rs b/src/file/mod.rs index d0307e5..e3d29d5 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -733,6 +733,14 @@ impl NamedTempFile { pub fn into_temp_path(self) -> TempPath { self.path } + + /// Converts the named temporary file into its constituent parts. + /// + ...
2
29
0
d1075d452afa6bc5819892a29ac4cb2cd617246c
Steven Allen
2019-02-13T00:15:16
use stdlib open options for creating unnamed temporary files
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 3ac8284..d3e9a6e 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -60,19 +60,19 @@ fn create_unlinked(path: &Path) -> io::Result<File> { #[cfg(target_os = "linux")] pub fn create(dir: &Path) -> io::Result<File> { - use libc::{open64, O...
1
13
13
8389b79f2ed9216fa0f6734562f8ba3dbc8b875f
Steven Allen
2019-02-11T02:55:09
modernize stdlib usage
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index e9754f6..3ac8284 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -3,21 +3,12 @@ use std::ffi::{CString, OsStr}; use std::fs::{self, File, OpenOptions}; use std::io; use std::os::unix::ffi::OsStrExt; -use std::os::unix::io::{AsRawFd, FromR...
2
44
105
1065f4412a7b6e686e4d06befa2dd9e9b6716d33
Steven Allen
2019-02-11T02:38:48
fix lfs support
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index b66c914..e9754f6 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -1,5 +1,3 @@ -#[cfg(not(target_os = "redox"))] -use libc::{c_char, c_int, link, rename, unlink, O_CLOEXEC, O_CREAT, O_EXCL, O_RDWR}; use std::env; use std::ffi::{CString, OsS...
1
7
6
951d1c6e15440357a9bc6fef6fe61b9553eaf8d3
Steven Allen
2019-02-10T23:01:46
make create_unlinked use absolute path names Otherwise, a concurrent (in a different thread) cwd change could cause us to unlink the wrong file.
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 03f3714..b66c914 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -1,5 +1,6 @@ #[cfg(not(target_os = "redox"))] use libc::{c_char, c_int, link, rename, unlink, O_CLOEXEC, O_CREAT, O_EXCL, O_RDWR}; +use std::env; use std::ffi::{CString, OsS...
1
10
0
d3ae2cf7297e3c8073ec6cc37a285de72fac7fec
Steven Allen
2019-02-10T22:50:52
make the path absolute when creating named temporary files Otherwise, we can end up deleting the wrong file when we change directories.
diff --git a/src/file/mod.rs b/src/file/mod.rs index c16d8ec..d0307e5 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -795,7 +795,12 @@ impl std::os::windows::io::AsRawHandle for NamedTempFile { } } -pub(crate) fn create_named(path: PathBuf) -> io::Result<NamedTempFile> { +pub(crate) fn create_named(mut p...
2
16
1
c3889afe6218b9138d2b4204e41a31f621d27f1e
Steven Allen
2019-02-10T20:37:18
Change the builder to accept &AsRef<OsStr> This covers `&str`, `&OsStr`, etc.
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index b5df7c4..03f3714 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -1,6 +1,6 @@ #[cfg(not(target_os = "redox"))] use libc::{c_char, c_int, link, rename, unlink, O_CLOEXEC, O_CREAT, O_EXCL, O_RDWR}; -use std::ffi::CString; +use std::ffi::{CSt...
4
52
46
097b1410a99a851f716801c5ad96c50d0f75195b
Steven Allen
2019-02-07T20:08:36
chore: format (so my editor doesn't make random changes in every file I touch)
diff --git a/src/dir.rs b/src/dir.rs index eb48159..90507a7 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -237,7 +237,7 @@ impl TempDir { } /// Attempts to make a temporary directory inside of `dir`. - /// The directory and everything inside it will be automatically + /// The directory and everything i...
9
34
23
8319dae0b21467def6539099db97e048fe077d1d
Steven Allen
2019-02-06T20:17:17
release 3.0.6
diff --git a/Cargo.toml b/Cargo.toml index 12b8f55..dc3f375 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "3.0.5" +version = "3.0.6" authors = [ "Steven Allen <steven@stebalien.com>", "The Rust Project Developers",
1
1
1
221480b50a9b8b30c62c4c9012503217dc4c5759
Jason White
2018-12-27T23:36:00
Don't set FILE_ATTRIBUTE_HIDDEN If this attribute is set, we cannot close and reopen the file and then write to it. Attempting to open the file a second time in write mode results in `ERROR_ACCESS_DENIED`. For reference, see the CreateFile MSDN docs: If CREATE_ALWAYS and FILE_ATTRIBUTE_NORMAL are specified, Crea...
diff --git a/src/file/imp/windows.rs b/src/file/imp/windows.rs index 27c28ce..ff36564 100644 --- a/src/file/imp/windows.rs +++ b/src/file/imp/windows.rs @@ -10,7 +10,7 @@ use winapi::um::fileapi::{CreateFileW, SetFileAttributesW, CREATE_NEW}; use winapi::um::handleapi::INVALID_HANDLE_VALUE; use winapi::um::winbase::{...
2
8
3
28a7fed7febacbcaede9bc40bac53c88f7fde2bd
Jason White
2018-12-28T00:24:57
Allow deprecated usage of Error::cause std::io::Error hasn't implemented `Error::source`, so we can't use that yet.
diff --git a/src/error.rs b/src/error.rs index 5d70fae..36d83db 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,7 +17,8 @@ impl error::Error for PathError { fn description(&self) -> &str { self.err.description() } - + + #[allow(deprecated)] fn cause(&self) -> Option<&error::Error> { ...
1
2
1
7c099e9a22255b7888d8be49b8118bc0ba2f083c
Steven Allen
2018-11-26T20:33:53
release 3.0.5
diff --git a/Cargo.toml b/Cargo.toml index 36cebd0..12b8f55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "3.0.4" +version = "3.0.5" authors = [ "Steven Allen <steven@stebalien.com>", "The Rust Project Developers",
1
1
1
683a4d1095aa296d41e12d5e4e668eb40a9a16ab
Jeremy Soller
2018-11-26T18:43:15
Redox: Fix type definition for create_named
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index f8766d0..b5df7c4 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -53,7 +53,7 @@ pub fn create_named(path: &Path) -> io::Result<File> { } #[cfg(target_os = "redox")] -pub fn create_named(path: PathBuf) -> io::Result<File> { +pub fn create...
1
1
1
d2d21f838397b88a4fc16e51493a87b9b84ef36f
Alex Gaynor
2018-11-14T14:38:09
Bumped rand version to 0.6
diff --git a/Cargo.toml b/Cargo.toml index 6bc59c7..36cebd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ license = "MIT/Apache-2.0" exclude = ["/.travis.yml", "/appveyor.yml"] [dependencies] -rand = "0.5" +rand = "0.6" remove_dir_all = "0.5" cfg-if = "0.1"
1
1
1
b0f2417b9245cfb834dac6771e7895c7abd8841b
Ashley Mannix
2018-10-30T22:49:56
wrap up the map_err call
diff --git a/src/dir.rs b/src/dir.rs index de806ef..eb48159 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -12,7 +12,7 @@ use remove_dir_all::remove_dir_all; use std::path::{self, Path, PathBuf}; use std::{fmt, fs, io}; -use error::IoErrorExt; +use error::IoResultExt; use Builder; /// Create a new temporary direct...
4
31
25
e6852641e640b4eb22cda9400262dc9cd0f488bf
Ashley Mannix
2018-10-30T02:09:05
attach a path to errors where possible
diff --git a/src/dir.rs b/src/dir.rs index f7ed5c2..de806ef 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -12,6 +12,7 @@ use remove_dir_all::remove_dir_all; use std::path::{self, Path, PathBuf}; use std::{fmt, fs, io}; +use error::IoErrorExt; use Builder; /// Create a new temporary directory. @@ -368,7 +369,7 @@ ...
5
73
24
dbc084e97b9ee1f5ed2e58f89ff6682a3336e0a0
Igor Gnatenko
2018-10-27T00:21:56
exclude CI files
diff --git a/Cargo.toml b/Cargo.toml index fae6f7e..6bc59c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ repository = "https://github.com/Stebalien/tempfile" homepage = "http://stebalien.com/projects/tempfile-rs" keywords = ["tempfile", "tmpfile", "filesystem"] license = "MIT/Apache-2.0" +exclude = ["/...
1
1
0
6d67364d63a810e8cfa34ec683fd36c37bf6e27d
Noah Levitt
2018-10-01T21:20:44
implement most of Stebalien's suggestions on https://github.com/Stebalien/tempfile/pull/68 - use enum SpooledInner - implement rollover() as roll() (and rename rolled_over() to is_rolled()) - implement set_len() - other tweaks
diff --git a/src/spooled.rs b/src/spooled.rs index 78a4f1e..b046c13 100644 --- a/src/spooled.rs +++ b/src/spooled.rs @@ -1,6 +1,13 @@ use std::fs::File; use std::io::{self, Read, Write, Seek, SeekFrom, Cursor}; use file::tempfile; +use std::mem::drop; + +#[derive(Debug)] +enum SpooledInner { + InMemory(Cursor<Vec...
3
369
263
79c8314471a1b860abde032e63f87b47a9010654
Noah Levitt
2018-09-27T06:52:13
missed a bang
diff --git a/src/spooled.rs b/src/spooled.rs index 1694b31..78a4f1e 100644 --- a/src/spooled.rs +++ b/src/spooled.rs @@ -48,7 +48,7 @@ pub struct SpooledTempFile { /// // `max_size` (15), so it will be written to a temporary file on disk, /// // and the in-memory buffer will be dropped /// writeln!(file, "marvin gar...
1
1
1
a5390c1993cda563f5b0e765d5a12b787c40c04c
Noah Levitt
2018-09-27T06:44:18
spooled temporary file
diff --git a/src/lib.rs b/src/lib.rs index c5e21d2..7d9c674 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -115,9 +115,11 @@ use std::{env, io}; mod dir; mod file; mod util; +mod spooled; pub use dir::{tempdir, tempdir_in, TempDir}; pub use file::{tempfile, tempfile_in, NamedTempFile, PersistError, TempPath}; +pub ...
3
355
0
5bd216b95321efa1408f9008d8813d3cb0d93e01
Steven Allen
2018-09-14T02:16:15
Release 3.0.4 * Adds "support" for unsupported platforms. Thanks @alexcrichton!
diff --git a/Cargo.toml b/Cargo.toml index 2db2681..fae6f7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "3.0.3" +version = "3.0.4" authors = [ "Steven Allen <steven@stebalien.com>", "The Rust Project Developers",
1
1
1
183b5ba9c8c9dcd852ff8dec951d194169bff864
Alex Crichton
2018-09-14T01:53:40
Fix compile on wasm32 This commit "adds support" for the wasm32-unknown-unknown target by simply defining stubs that return errors, and it'll be up to crates depending on `tempfile` to ensure they don't use this at runtime on wasm.
diff --git a/Cargo.toml b/Cargo.toml index 0d9a59a..2db2681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ license = "MIT/Apache-2.0" [dependencies] rand = "0.5" remove_dir_all = "0.5" +cfg-if = "0.1" [target.'cfg(unix)'.dependencies] libc = "0.2.27" diff --git a/src/file/imp/mod.rs b/src/file/imp/mo...
4
38
11
b1f3e8123451d039afd906958a637a596ff5b9e2
Steven Allen
2018-07-17T19:17:42
release 3.0.3 * update rand to 0.5
diff --git a/Cargo.toml b/Cargo.toml index 378de6b..0d9a59a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "3.0.2" +version = "3.0.3" authors = [ "Steven Allen <steven@stebalien.com>", "The Rust Project Developers",
1
1
1
c46491e92a05a0275a2de96f56241ce332c39634
Jon Gjengset
2018-07-17T16:33:05
Bump rand to 0.5
diff --git a/Cargo.toml b/Cargo.toml index fc845e1..378de6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ keywords = ["tempfile", "tmpfile", "filesystem"] license = "MIT/Apache-2.0" [dependencies] -rand = "0.4" +rand = "0.5" remove_dir_all = "0.5" [target.'cfg(unix)'.dependencies] diff --git a/src/...
2
2
2
b0d3e383eabb203cec6d037f6a794ac8482d8853
Tshepang Lekhonkhobe
2018-06-28T18:49:07
slight doc fixes
diff --git a/src/lib.rs b/src/lib.rs index 848a1c4..8813e16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,9 +14,9 @@ //! //! ## Resource Leaking //! -//! `tempfile` will (almost) never fail to cleanup temporary resources but `TempDir` and `NamedTempFile` will if +//! `tempfile` will (almost) never fail to cleanup ...
1
2
2
1c08db3ab8b8623e0f7cb02a600f957981fe5d90
Ashley Mannix
2018-05-17T00:35:03
fix up some errors in docs
diff --git a/src/dir.rs b/src/dir.rs index ba18d7a..f7ed5c2 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -119,8 +119,7 @@ pub fn tempdir_in<P: AsRef<Path>>(dir: P) -> io::Result<TempDir> { /// /// The [`TempDir`] type creates a directory on the file system that /// is deleted once it goes out of scope. At constructio...
1
5
8
ca2a9718ac30eb2e7732c38f8091d7446ba076de
Steven Allen
2018-05-10T16:38:46
release 3.0.2
diff --git a/Cargo.toml b/Cargo.toml index 1fffc49..fc845e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "3.0.1" +version = "3.0.2" authors = [ "Steven Allen <steven@stebalien.com>", "The Rust Project Developers",
1
1
1
2b8e3e8d8798002f3db24969610feebf5eb2b0a8
Oliver Henshaw
2018-05-08T14:09:35
Add test to emulate a pathological temporary file cleaner Assert that temporary files work as expected in the presence of a file cleaner that aggressively removes files in the tmpdir.
diff --git a/tests/tempfile.rs b/tests/tempfile.rs index f9d3d78..b77da4a 100644 --- a/tests/tempfile.rs +++ b/tests/tempfile.rs @@ -1,6 +1,8 @@ extern crate tempfile; use std::io::{Read, Seek, SeekFrom, Write}; use std::fs; +use std::thread; +use std::sync::mpsc::{sync_channel, TryRecvError}; #[test] fn test_ba...
1
38
0
236183db2f740fda40f0ceff2716c53eacb034d9
Oliver Henshaw
2018-05-08T11:49:45
create_unix should create an unlinked File Allows the OS to clean up the file on disk after the last file descriptor is closed. This used to be the behaviour of create_unix but this was lost after porting to use the util helper in bde363d751db4247296ae9345c2e346ec3abe971. Does not affect linux on systems with O_TMPF...
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 9eb3114..f8766d0 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -1,7 +1,7 @@ #[cfg(not(target_os = "redox"))] use libc::{c_char, c_int, link, rename, unlink, O_CLOEXEC, O_CREAT, O_EXCL, O_RDWR}; use std::ffi::CString; -use std::fs::{File...
2
22
2
014dc3ae3caf6a785b81e0ab5a587cc9f56a39d4
Steven Allen
2018-04-17T13:47:37
restore NamedTempFile::new_in We missed this when going back-and-forth on the API design.
diff --git a/src/file/mod.rs b/src/file/mod.rs index 58eab47..90b9508 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -487,6 +487,15 @@ impl NamedTempFile { Builder::new().tempfile() } + /// Create a new named temporary file in the specified directory. + /// + /// See [`NamedTempFile::new...
1
9
0
ebe536cdc8d167e8065de2a99e1f2859097990eb
Steven Allen
2018-04-01T17:41:41
clippy all the things
diff --git a/src/file/mod.rs b/src/file/mod.rs index 18de9a3..58eab47 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -552,7 +552,7 @@ impl NamedTempFile { /// # } /// ``` pub fn close(self) -> io::Result<()> { - let NamedTempFile { path, file: _ } = self; + let NamedTempFile { path, ...
3
21
21
5d8ba83c2013e41c675342a4d6d97c530802ec98
Steven Allen
2018-04-01T04:30:19
use O_TMPFILE from libc
diff --git a/Cargo.toml b/Cargo.toml index 0481701..a387124 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ rand = "0.4" remove_dir_all = "0.5" [target.'cfg(unix)'.dependencies] -libc = "0.2" +libc = "0.2.27" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["fileapi", "win...
2
2
2
f7bb4f4b80640f7d304b3b1a8874f198bd938700
Steven Allen
2018-04-01T04:24:18
get rid of outdated todo
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index 87fcd14..1ad4b7e 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -35,7 +35,6 @@ pub fn cvt_err(result: Result<usize, syscall::Error>) -> io::Result<usize> { // Stolen from std. pub fn cstr(path: &Path) -> io::Result<CString> { - // TO...
1
0
1
5fe06c4fdd32351cf73cbda994fd31b0bb92948a
Steven Allen
2018-04-01T04:15:10
use the question mark
diff --git a/src/file/imp/unix.rs b/src/file/imp/unix.rs index aeebb1e..53b8a7b 100644 --- a/src/file/imp/unix.rs +++ b/src/file/imp/unix.rs @@ -43,10 +43,10 @@ pub fn cstr(path: &Path) -> io::Result<CString> { #[cfg(not(target_os = "redox"))] pub fn create_named(path: &Path) -> io::Result<File> { unsafe { - ...
1
17
17
2d2bd57217ff8121479607e177869489f9936c57
Steven Allen
2018-03-25T20:17:06
bump to 3.0.0 closes #43
diff --git a/Cargo.toml b/Cargo.toml index f30ee41..0481701 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,17 @@ [package] name = "tempfile" -version = "2.2.0" -authors = ["Steven Allen <steven@stebalien.com>", "The Rust Project Developers"] +version = "3.0.0" +authors = [ + "Steven Allen <steven@stebalien.com...
1
8
3
53a2f2b36ca2742affac718165d24fdd3aac000d
Aaron Power
2018-02-15T02:29:39
Bump remove_dir_all version to 0.5
diff --git a/Cargo.toml b/Cargo.toml index c4d8bb6..f30ee41 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ license = "MIT/Apache-2.0" [dependencies] rand = "0.4" -remove_dir_all = "0.3" +remove_dir_all = "0.5" [target.'cfg(unix)'.dependencies] libc = "0.2"
1
1
1
eefd8ca2c2e7c604d0a0b416f7647c0c2a34c4a7
Garrett Berg
2018-02-07T17:06:22
improve docs for TempDir::into_path
diff --git a/src/dir.rs b/src/dir.rs index bda0f31..b6f1206 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -148,11 +148,11 @@ pub fn tempdir_in<P: AsRef<Path>>(dir: P) -> io::Result<TempDir> { /// run, such as via [`std::process::exit()`], by segfaulting, or by /// receiving a signal like `SIGINT`, then the temporary di...
1
17
15
f27591deb41bf8c228a00d4fa120f21851c9e062
Jason White
2018-02-07T05:42:52
Allow closing of a NamedTempFile file handle This is useful for closing the file without deleting it so that other processes can open it.
diff --git a/src/file/mod.rs b/src/file/mod.rs index 5b0ea59..e9fdded 100644 --- a/src/file/mod.rs +++ b/src/file/mod.rs @@ -1,9 +1,12 @@ use std::io::{self, Read, Write, Seek, SeekFrom}; use std::fs::{self, File}; use std::path::{Path, PathBuf}; +use std::ops::Deref; +use std::ffi::OsStr; use std::error; use std:...
3
362
56
bde363d751db4247296ae9345c2e346ec3abe971
Ashley Mannix
2018-02-04T21:28:23
restore convenience functions
diff --git a/Cargo.toml b/Cargo.toml index 19018ee..c4d8bb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.6" +version = "2.2.0" authors = ["Steven Allen <steven@stebalien.com>", "The Rust Project Developers"] description = """ A library for managing temporary ...
8
227
109
020c8a8382f078be0771e27a0609f67ddb62a02a
Ashley Mannix
2018-01-24T20:12:47
fix up docs
diff --git a/src/dir.rs b/src/dir.rs index 43a01eb..7ee4b3e 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -25,7 +25,7 @@ use ::Builder; /// The default constructor, [`TempDir::new`], creates directories in /// the location returned by [`std::env::temp_dir()`], but `TempDir` /// can be configured to manage a temporary ...
2
108
48
8496b9e359cf105f245255d567084a8da6feac8e
Ashley Mannix
2018-01-20T22:58:36
fix up unit tests
diff --git a/tests/namedtempfile.rs b/tests/namedtempfile.rs index 392a13a..b7733f5 100644 --- a/tests/namedtempfile.rs +++ b/tests/namedtempfile.rs @@ -1,5 +1,5 @@ extern crate tempfile; -use tempfile::{NamedTempFile, NamedTempFileBuilder}; +use tempfile::{NamedTempFile, Builder}; use std::env; use std::io::{Write,...
2
31
17
aafb4697d8d50480fe2536637698f2bd8cd14274
Ashley Mannix
2018-01-15T22:33:25
use same builder for temp files and dirs
diff --git a/src/dir.rs b/src/dir.rs index e97c48c..43a01eb 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -8,64 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use std::env; -use std::io::{self, Error, ErrorKind}; -use std::fmt; -use std::fs; +use std::{i...
6
336
389
f12aeb3eb6d7c82e6dc0299c5b8bccaeb7ac4593
Igor Gnatenko
2017-12-31T14:13:11
bump rand to 0.4
diff --git a/Cargo.toml b/Cargo.toml index e08c694..56e7002 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["tempfile", "tmpfile", "filesystem"] license = "MIT/Apache-2.0" [dependencies] -rand = "0.3" +rand = "0.4" [target.'cfg(unix)'.dependencies] libc = "0.2"
1
1
1
4fe60c54c7c216653626ea7dbf304048f70c0741
Bastien Orivel
2018-01-06T16:46:02
Bump winapi to 0.3
diff --git a/Cargo.toml b/Cargo.toml index 95fea31..e08c694 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,8 +17,7 @@ rand = "0.3" libc = "0.2" [target.'cfg(windows)'.dependencies] -winapi = "0.2" -kernel32-sys = "0.2" +winapi = { version = "0.3", features = ["fileapi", "winbase", "handleapi"] } [target.'cfg(ta...
3
25
21
d3af758decec8dc63a317c28a400b4e8db8f992f
Steven Allen
2017-09-26T06:31:55
Release 2.2.0 * Adds Redox support.
diff --git a/Cargo.toml b/Cargo.toml index e73f527..95fea31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.6" +version = "2.2.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
b1a57a0202c072755af7c18e8f20266d1d3fac0a
Ian Douglas Scott
2017-08-15T01:23:50
Add Redox OS backend (#32) * Add Redox OS backend
diff --git a/Cargo.toml b/Cargo.toml index d8b82b0..e73f527 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,3 +19,6 @@ libc = "0.2" [target.'cfg(windows)'.dependencies] winapi = "0.2" kernel32-sys = "0.2" + +[target.'cfg(target_os = "redox")'.dependencies] +redox_syscall = "0.1" diff --git a/src/imp/mod.rs b/src/imp...
4
58
32
02061c79a3534a9eebff55e33baabb681fe66493
Steven Allen
2017-07-16T07:14:32
Release 2.1.6 * Remove build script and bump minimum rustc version.
diff --git a/Cargo.toml b/Cargo.toml index a42cd63..d8b82b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.5" +version = "2.1.6" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files." @@ -18,4 +18,4 @@ libc = "0.2" ...
1
2
2
f0e8d97f5e5e0c7e42b91e33fedb0fb51a3fc758
Steven Allen
2017-01-19T21:23:05
bump to 2.1.5
diff --git a/Cargo.toml b/Cargo.toml index e787da7..40b999c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.4" +version = "2.1.5" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
1b7e8c61c356be1b10450fbd895af1dab9b178a5
Steven Allen
2017-01-19T21:21:33
Only pull in libc on unix
diff --git a/Cargo.toml b/Cargo.toml index 56e3623..e787da7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,9 +13,11 @@ license = "MIT/Apache-2.0" build = "build.rs" [dependencies] -libc = "0.2" rand = "0.3" +[target.'cfg(unix)'.dependencies] +libc = "0.2" + [target.'cfg(windows)'.dependencies] winapi = "0.2" ...
2
6
2
0dd768bf0d6be1fd0e45c13ae4a601a2816de4b9
Steven Allen
2017-01-19T20:52:05
Fix clippy warning in tests.
diff --git a/tests/namedtempfile.rs b/tests/namedtempfile.rs index 023fdd7..cc2d74c 100644 --- a/tests/namedtempfile.rs +++ b/tests/namedtempfile.rs @@ -91,7 +91,7 @@ fn test_customnamed() { .create() .unwrap(); let name = tmpfile.path().file_name().unwrap().to_str().u...
1
1
1
5db43bb3e5193995a7199448ffdffc2d8a46204f
Steven Allen
2017-01-19T20:50:17
Cleanup documentation
diff --git a/src/named.rs b/src/named.rs index 16b3063..f83db77 100644 --- a/src/named.rs +++ b/src/named.rs @@ -120,18 +120,24 @@ impl NamedTempFile { /// delete your file. /// /// Reasons to use this method: - /// 1. The file has a short lifetime and your temporary file cleaner is sane (doesn't de...
2
48
35
3c501578d45094fa7f947ce9f9a7fd579be94548
Matt Brubeck
2017-01-06T00:55:31
Use target-specific dependencies
diff --git a/Cargo.toml b/Cargo.toml index e953ab1..56e3623 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,8 @@ build = "build.rs" [dependencies] libc = "0.2" rand = "0.3" + +[target.'cfg(windows)'.dependencies] winapi = "0.2" kernel32-sys = "0.2"
1
2
0
e8084bf2adb025beb02f42018379a571552a931a
Steven Allen
2016-06-14T14:11:02
Release 2.1.4
diff --git a/Cargo.toml b/Cargo.toml index 4e124e1..e953ab1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.3" +version = "2.1.4" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
b87fbc70ffd45b5f2b662a9b49b5b33fd28fc6da
Steven Allen
2016-06-14T14:10:35
fix tags
diff --git a/Cargo.toml b/Cargo.toml index a6597ed..4e124e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ description = "Securely create temporary files." documentation = "https://stebalien.github.io/tempfile/tempfile/" repository = "https://github.com/Stebalien/tempfile" homepage = "http://stebalien.com/...
1
1
1
ec454938c8bb2eb632ab7a4165366ed9aada1faa
Steven Allen
2016-06-01T18:32:37
add simple tempfile example
diff --git a/src/lib.rs b/src/lib.rs index 4d54def..08addec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,15 @@ //! `File` objects and `NamedTempFile`. When choosing between the variants, prefer `tempfile()` //! unless you either need to know the file's path or to be able to persist it. //! +//! # Example +//!...
1
9
0
9c369a0dceb6a0dabb1d23cc8a84dd7663e13065
Steven Allen
2016-05-11T18:36:42
Fix clippy lints
diff --git a/src/named.rs b/src/named.rs index 9c768ff..16b3063 100644 --- a/src/named.rs +++ b/src/named.rs @@ -214,7 +214,7 @@ impl NamedTempFile { /// returned by this function; the `File`s will remain usable. However, they may not be /// nameable. pub fn reopen(&self) -> io::Result<File> { - i...
3
5
5
f8953dfa63a29a70966d9bb8a6ca4149eb4ee7c8
Steven Allen
2016-05-11T18:06:04
remove clippy dep (use cargo clippy)
diff --git a/Cargo.toml b/Cargo.toml index 3db17a7..a6597ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,10 +18,6 @@ rand = "0.3" winapi = "0.2" kernel32-sys = "0.2" -[dependencies.clippy] -version = "0" -optional = true - [features] default=[] diff --git a/src/lib.rs b/src/lib.rs index dd0e94d..4d54def 1006...
2
0
7
013c7b0c0dc0ef58137cf541301ca88539344dc6
Steven Allen
2016-04-21T17:00:46
Release 2.1.3
diff --git a/Cargo.toml b/Cargo.toml index d118157..3db17a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.2" +version = "2.1.3" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
854b37b3baf0e11ba6cc30b002e9b8424974dbfe
Martin Pool
2016-04-21T15:25:36
Expose PersistError
diff --git a/src/lib.rs b/src/lib.rs index a090f12..dd0e94d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,5 +42,5 @@ mod imp; mod named; mod unnamed; -pub use named::{NamedTempFile, NamedTempFileOptions}; +pub use named::{NamedTempFile, NamedTempFileOptions, PersistError}; pub use unnamed::{tempfile, tempfile_in...
1
1
1
e0491c04e3ca34433f8a2462f5a49fd6a60015ec
Steven Allen
2016-04-11T16:58:37
Release 2.1.2
diff --git a/Cargo.toml b/Cargo.toml index bcb4c40..d118157 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.1" +version = "2.1.2" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
2fca0aa18c95f7730d6b5b2ee541905e72bc043c
Steven Allen
2016-04-11T16:52:02
Add Read/Write/Seek impls on &NamedTempFile This mirrors the implementations on &TempFile. One can currently just deref to a File but these implementations are more discoverable.
diff --git a/src/named.rs b/src/named.rs index e603f70..9c768ff 100644 --- a/src/named.rs +++ b/src/named.rs @@ -241,6 +241,12 @@ impl Read for NamedTempFile { } } +impl<'a> Read for &'a NamedTempFile { + fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { + (&***self).read(buf) + } +} + imp...
2
33
0
33dcf9e218f6f6fec6b44cadb5feca7e63e93e16
Steven Allen
2016-02-17T23:06:52
Release 2.1.1 * Add LFS support.
diff --git a/Cargo.toml b/Cargo.toml index 0b1b08e..bcb4c40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.1.0" +version = "2.1.1" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
c8811d156ceabf07eb0d8e9fc6dc5284cf816f59
Steven Allen
2016-02-16T02:01:45
LFS is only supported in rust >= 1.8.0
diff --git a/Cargo.toml b/Cargo.toml index 044a082..0b1b08e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,8 @@ homepage = "http://stebalien.com/projects/tempfile-rs" keywords = ["tempfile", "tmpfile"] license = "MIT/Apache-2.0" +build = "build.rs" + [dependencies] libc = "0.2" rand = "0.3" @@ -22,3 +24,6...
3
21
6
fb949b8f2e645b93047741c1cf7112339138d343
Steven Allen
2016-02-16T01:46:34
Add LFS support on linux
diff --git a/src/imp/unix.rs b/src/imp/unix.rs index e68be5e..a674dc2 100644 --- a/src/imp/unix.rs +++ b/src/imp/unix.rs @@ -1,5 +1,4 @@ -use libc::{self, O_EXCL, O_RDWR, O_CREAT, O_CLOEXEC}; -use libc::stat as stat_t; +use libc::{rename, link, unlink, c_char, c_int, O_EXCL, O_RDWR, O_CREAT, O_CLOEXEC}; use std::os::u...
1
24
11
7b57a8c78867aa9bde8acd1b8a021ed3a084b168
Steven Allen
2016-02-11T21:17:39
Fix clippy dep version
diff --git a/Cargo.toml b/Cargo.toml index 2b256be..044a082 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ winapi = "0.2" kernel32-sys = "0.2" [dependencies.clippy] -version = "*" +version = "0" optional = true [features]
1
1
1
7789a4562c1900950816b782b777604f23240149
Steven Allen
2016-02-11T21:05:03
Bump to 2.1.0
diff --git a/Cargo.toml b/Cargo.toml index 1d7eed7..2b256be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tempfile" -version = "2.0.1" +version = "2.1.0" authors = ["Steven Allen <steven@stebalien.com>"] description = "Securely create temporary files."
1
1
1
6154182f0fbf2d46f542a44c1382c462c5a23f36
Steven Allen
2016-02-11T20:53:30
Add method to convert namedtempfile to unnamed
diff --git a/src/named.rs b/src/named.rs index 98c8e37..e603f70 100644 --- a/src/named.rs +++ b/src/named.rs @@ -14,11 +14,15 @@ use super::imp; /// /// This variant is *NOT* secure/reliable in the presence of a pathological temporary file cleaner. /// -/// NamedTempFiles are deleted on drop. As rust doesn't guarant...
2
30
2
4e21b6aaffd62982f2908533161700e5b066aed0
Steven Allen
2016-02-11T20:58:32
Implement AsRef<File> for NamedTempFile For completeness.
diff --git a/src/named.rs b/src/named.rs index 46699c5..98c8e37 100644 --- a/src/named.rs +++ b/src/named.rs @@ -21,6 +21,18 @@ use super::imp; /// pub struct NamedTempFile(Option<NamedTempFileInner>); +impl AsRef<File> for NamedTempFile { + fn as_ref(&self) -> &File { + self + } +} + +impl AsMut<File>...
1
12
0
1ab5f917de057fbd7e50e3da2e773adfb719f32b
Steven Allen
2016-02-11T19:22:11
Add clippy
diff --git a/Cargo.toml b/Cargo.toml index ca99911..1d7eed7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,10 @@ libc = "0.2" rand = "0.3" winapi = "0.2" kernel32-sys = "0.2" + +[dependencies.clippy] +version = "*" +optional = true + +[features] +default=[] diff --git a/src/imp/unix.rs b/src/imp/unix.rs index...
3
12
1
db7211f899539037467829eff832942c69a4e497
Steven Allen
2016-01-19T04:55:17
Rustfmt tests
diff --git a/tests/namedtempfile.rs b/tests/namedtempfile.rs index ad208c9..ab64914 100644 --- a/tests/namedtempfile.rs +++ b/tests/namedtempfile.rs @@ -85,11 +85,11 @@ fn test_persist_noclobber() { #[test] fn test_customnamed() { let tmpfile = NamedTempFileOptions::new() - .prefix("tmp") - .suffix...
1
5
5
5e3919a07d3407d5d408a066d8108c6422e472eb
Steven Allen
2016-01-19T03:56:29
Better example assertions
diff --git a/src/named.rs b/src/named.rs index 6296974..b938a33 100644 --- a/src/named.rs +++ b/src/named.rs @@ -252,7 +252,13 @@ impl std::os::windows::io::AsRawHandle for NamedTempFile { /// .rand_bytes(5) /// .create() /// .unwrap(); -/// pri...
1
7
1
1ee1117fac5a42d04c7eb712e4350b282b089abc
Steven Allen
2016-01-18T22:22:23
Add homepage link
diff --git a/Cargo.toml b/Cargo.toml index db97002..90e5708 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,7 @@ description = "Securely create temporary files." documentation = "https://stebalien.github.io/tempfile/tempfile/" repository = "https://github.com/Stebalien/tempfile" +homepage = "http://stebalien.co...
1
1
0