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 |
|---|---|---|---|---|---|---|---|
eb26bbf7648891050c46770a850b1d9e90915854 | Nathan Lilienthal | 2018-01-11T03:57:18 | Fix the utf8parse tests too. | diff --git a/utf8parse/src/lib.rs b/utf8parse/src/lib.rs
index dc4b0fa..3a8ca2f 100644
--- a/utf8parse/src/lib.rs
+++ b/utf8parse/src/lib.rs
@@ -95,11 +95,14 @@ impl Parser {
}
#[cfg(test)]
-mod tests {
- extern crate std;
+#[macro_use]
+extern crate std;
+#[cfg(test)]
+mod tests {
use std::io::Read;
... | 1 | 5 | 2 |
3b1d5fce1da158f392f9eb0b1cd191f31a6d1a5d | Nathan Lilienthal | 2018-01-11T03:32:38 | Fix tests to run.
Links against STD to allow use of Vec. | diff --git a/src/lib.rs b/src/lib.rs
index 0ec1239..af353cd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -413,8 +413,13 @@ pub trait Perform {
fn esc_dispatch(&mut self, params: &[i64], intermediates: &[u8], ignore: bool, byte: u8);
}
+#[cfg(test)]
+#[macro_use]
+extern crate std;
+
#[cfg(test)]
mod tests {
+ ... | 1 | 5 | 0 |
7d71f6a02a4bbd00805c91388f257198c1173912 | M Farkas-Dyck | 2017-11-19T02:38:31 | no_std (#9) | diff --git a/src/definitions.rs b/src/definitions.rs
index d8faf53..3cfa7de 100644
--- a/src/definitions.rs
+++ b/src/definitions.rs
@@ -51,10 +51,10 @@ pub enum Action {
pub fn unpack(delta: u8) -> (State, Action) {
(
// State is stored in bottom 4 bits
- unsafe { ::std::mem::transmute(delta & 0x... | 4 | 12 | 6 |
2be387f7efba8871ad85b5a22fb275323efa462c | Joe Wilm | 2017-08-19T18:02:07 | Add README field to Cargo.toml
This will allow the README to be rendered on crates.io.
Bumped version so this can be published. | diff --git a/Cargo.toml b/Cargo.toml
index d0db2ad..fd51683 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,12 +1,13 @@
[package]
name = "vte"
-version = "0.3.1"
+version = "0.3.2"
authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0 OR MIT"
description = "Parser for implementing terminal emulators"
keywor... | 1 | 2 | 1 |
13f3005d2772b015e54d0f43031dfb7a35403d6d | Joe Wilm | 2017-06-20T14:59:56 | Bump version for publish | diff --git a/Cargo.toml b/Cargo.toml
index ad8ba16..d0db2ad 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vte"
-version = "0.3.0"
+version = "0.3.1"
authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0 OR MIT"
description = "Parser for implementing terminal emulators" | 1 | 1 | 1 |
56f76600ff240d17ead0592ca228b655d256f769 | Aaron Hill | 2017-05-30T01:22:38 | Properly handle maximum number of CSI params
This commit ensures that 'num_params' is never incremented beyond
MAX_PARAMS. Additionally, an extra parameter is added to the
corresponding OSC test (17 params or MAX_PARAMS + 1) to ensure that the
proper behavior is tested. | diff --git a/src/lib.rs b/src/lib.rs
index 97d4c4f..02c7996 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -329,6 +329,11 @@ impl Parser {
if byte == b';' {
// Completed a param
let idx = self.num_params;
+
+ if idx == MAX_PARAMS {
+ ... | 1 | 34 | 3 |
2910bd0cec3c1b67f8b4e052d1865bb31a626a45 | Aaron Hill | 2017-05-16T20:50:35 | Prevent overflow when parsing CSI/DCS parameters
To prevent a large CSI or DCS parameter from overflowing an i64, the
value is limited to i64::MAX | diff --git a/src/lib.rs b/src/lib.rs
index a5317c3..97d4c4f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -335,8 +335,8 @@ impl Parser {
self.collecting_param = false;
} else {
// Continue collecting bytes into param
- self.param *= 10;
- ... | 1 | 37 | 18 |
86805965e630339ee19e06ecb5fdaf8c21e711ff | Aaron Hill | 2017-05-16T21:56:11 | Properly handle maximum number of OSC parameters
Previously, `osc_num_params` would be incremented when the final
parameter finished parsing, even if it was already at `MAX_PARAMS`. This
commit ensures that it is not incremented beyond `MAX_PARAMS`. | diff --git a/src/lib.rs b/src/lib.rs
index 68eb9e4..a5317c3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -277,6 +277,7 @@ impl Parser {
// First param is special - 0 to current byte index
0 => {
self.osc_params[param_idx] = (0, idx);
+ ... | 1 | 27 | 2 |
8c7fb776df288cf189fca60e211c5dd3a5c9241a | Joe Wilm | 2017-02-02T16:15:03 | Fix bug parsing CSI attributes
The sequence \E[;4m previously produced a param list of [4], but the
expected result is [0, 4]. The semicolon indicated that a param has been
completed. Since no byte is specified, it should be zero.
This fixes an issue with the save/restore cursor test in vttest for
Alacritty. | diff --git a/Cargo.toml b/Cargo.toml
index 4c5d4c1..9741153 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vte"
-version = "0.2.1"
+version = "0.2.2"
authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0 OR MIT"
description = "Parser for implementing terminal emulators"
diff --gi... | 2 | 55 | 12 |
5efa369bddf7de23cc290d5170f86bc36d3384f0 | Joe Wilm | 2017-01-11T05:16:03 | Fix bug with OSC parsing
An osc_dispatch with zero params would cause an underflow and index out
of bounds of self.osc_params. | diff --git a/Cargo.toml b/Cargo.toml
index 127a3c7..4c5d4c1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vte"
-version = "0.2.0"
+version = "0.2.1"
authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0 OR MIT"
description = "Parser for implementing terminal emulators"
diff --gi... | 2 | 56 | 27 |
955bc84adfc5719455038653edd40725416df9c2 | Joe Wilm | 2016-09-18T18:21:43 | Publish vte 0.1.1 | diff --git a/Cargo.toml b/Cargo.toml
index ef38bcb..01143c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "vte"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Joe Wilm <joe@jwilm.com>"]
license = "Apache-2.0 OR MIT"
description = "Parser for implementing terminal emulators" | 1 | 1 | 1 |
a15a9c3cf75fe08abdd4c7572e49a3daf6680064 | Joe Wilm | 2016-09-18T18:19:57 | Add inline attributes to vte stuff | diff --git a/src/lib.rs b/src/lib.rs
index 1a47700..d66f6bb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -95,10 +95,12 @@ impl Parser {
}
}
+ #[inline]
fn params(&self) -> &[i64] {
&self.params[..self.num_params]
}
+ #[inline]
fn intermediates(&self) -> &[u8] {
&s... | 1 | 5 | 0 |
edcb3d6defc69413f6b81a8c56be4ffbd638563d | Joe Wilm | 2016-09-18T18:19:26 | Lightly clean up code
Apparently byte character literals are a thing :). | diff --git a/src/lib.rs b/src/lib.rs
index f449e13..1a47700 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -217,8 +217,7 @@ impl Parser {
}
},
Action::Param => {
- // if byte == ';'
- if byte == 0x3b {
+ if byte == b';' {
... | 1 | 2 | 3 |
0caff0de30802ad5b68e60df6f296a003ed8a810 | Joe Wilm | 2016-09-18T00:26:44 | Specify version for utf8parse dependency | diff --git a/Cargo.toml b/Cargo.toml
index cb2d9f1..ef38bcb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,3 +10,4 @@ documentation = "https://docs.rs/vte/"
[dependencies.utf8parse]
path = "./utf8parse"
+version = "0.1" | 1 | 1 | 0 |
02301e8f2a9a4641ab893c48c0b0d3ee231d4e6b | Joe Wilm | 2016-09-18T00:03:47 | Fix import in example | diff --git a/examples/parselog.rs b/examples/parselog.rs
index 5c1836b..e04fd1e 100644
--- a/examples/parselog.rs
+++ b/examples/parselog.rs
@@ -1,5 +1,5 @@
//! Parse input from stdin and log actions on stdout
-extern crate vtparse;
+extern crate vte;
use std::io::{self, Read}; | 1 | 1 | 1 |
85388ab070fbc41c8cce3ffbfbcc0d1d917109e0 | Joe Wilm | 2016-09-17T23:52:57 | Rename and document vte crate | diff --git a/Cargo.toml b/Cargo.toml
index 3ccedb1..1e38f87 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "vtparse"
+name = "vte"
version = "0.1.0"
authors = ["Joe Wilm <joe@jwilm.com>"]
diff --git a/examples/parselog.rs b/examples/parselog.rs
index f4ae86a..5c1836b 100644
--- a/exampl... | 4 | 182 | 70 |
98276717f6335a92a97ddec72edb9348768d1e4e | Joe Wilm | 2016-09-17T22:55:15 | Remove UTF-8 TODO comment | diff --git a/src/lib.rs b/src/lib.rs
index 17e265e..e31ac14 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -45,8 +45,6 @@ impl<'a, P: Parser> utf8::Receiver for VtUtf8Receiver<'a, P> {
/// ANSI VTE Parser
///
/// As described in http://vt100.net/emu/dec_ansi_parser
-///
-/// TODO: utf8 support
pub struct StateMachine ... | 1 | 0 | 2 |
930f8cc30a5bc4943c1b56e18cf1a3f8bb00bc2a | Joe Wilm | 2016-09-17T03:34:39 | Implement first version of parser
Includes an example `parselog` which prints all of the actions a Parser
implementation is given the opportunity to handle. One way to test this
is to pipe vim into it:
vim | target/release/examples/parselog
And type `:q` to quit. Vim won't show up, but it still accepts input.
T... | diff --git a/examples/parselog.rs b/examples/parselog.rs
new file mode 100644
index 0000000..804c399
--- /dev/null
+++ b/examples/parselog.rs
@@ -0,0 +1,69 @@
+//! Parse input from stdin and log actions on stdout
+extern crate vtparse;
+
+use std::io::{self, Read};
+
+use vtparse::{StateMachine, Parser};
+
+/// A type ... | 2 | 157 | 46 |
5505121f6e67d1f39ff4d3aaea739b73e1a17345 | Joe Wilm | 2016-09-17T03:34:05 | Rename crate | diff --git a/Cargo.toml b/Cargo.toml
index cf36ebb..3ccedb1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "fun-table"
+name = "vtparse"
version = "0.1.0"
authors = ["Joe Wilm <joe@jwilm.com>"] | 1 | 1 | 1 |
8da0d9e67feeaaf5eab9a078cd5968bd45f47fe5 | Joe Wilm | 2016-09-17T03:33:51 | Expand unpack state/action tests | diff --git a/src/definitions.rs b/src/definitions.rs
index 42fb26e..5177ca6 100644
--- a/src/definitions.rs
+++ b/src/definitions.rs
@@ -66,6 +66,11 @@ mod tests {
_ => panic!("unpack failed"),
}
+ match unpack(0x0f) {
+ (State::Unused__, Action::None) => (),
+ _ => ... | 1 | 5 | 0 |
8553c85a9962fb2dda185cf86a72979fd4b755ff | Joe Wilm | 2016-09-17T03:33:36 | Fix some comments | diff --git a/src/definitions.rs b/src/definitions.rs
index 485609c..42fb26e 100644
--- a/src/definitions.rs
+++ b/src/definitions.rs
@@ -48,10 +48,10 @@ pub enum Action {
#[inline(always)]
pub fn unpack(delta: u8) -> (State, Action) {
(
- // Action is stored in bottom 4 bits
+ // State is stored in... | 1 | 2 | 2 |
4c2932c8b6c6c6e286963b496bc3c487266d5673 | Joe Wilm | 2016-09-17T03:32:52 | Add fixed table.rs | diff --git a/src/table.rs b/src/table.rs
index ebee5cf..923c7eb 100644
--- a/src/table.rs
+++ b/src/table.rs
@@ -20,7 +20,7 @@ pub static STATE_CHANGE: [[u8; 256]; 16] =
[0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8,
- 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u... | 1 | 189 | 174 |
19c27105cc7a69bbe5b27714023c6fb27f676f12 | Joe Wilm | 2016-09-17T03:26:01 | Fix errors in codegen | diff --git a/codegen/src/ext.rs b/codegen/src/ext.rs
index d489bf0..cef2267 100644
--- a/codegen/src/ext.rs
+++ b/codegen/src/ext.rs
@@ -2,11 +2,11 @@ use std::fmt;
use syntex::Registry;
-use syntex_syntax::ast::{self, ExprKind, MetaItem, Arm, Expr, PatKind, LitKind, Pat};
+use syntex_syntax::ast::{self, ExprKind,... | 2 | 5 | 5 |
171ad08b4e98bd23dd1aa9d28731c12dde35bba2 | Joe Wilm | 2016-09-17T03:25:43 | Add test for ext::Transition
Debugging | diff --git a/codegen/src/ext.rs b/codegen/src/ext.rs
index 94fdd51..d489bf0 100644
--- a/codegen/src/ext.rs
+++ b/codegen/src/ext.rs
@@ -396,3 +396,15 @@ fn expand_state_table<'cx>(
MacEager::expr(ast)
}
+
+#[cfg(test)]
+mod tests {
+ use definitions::{State, Action};
+ use super::Transition;
+
+ #[tes... | 1 | 12 | 0 |
0e9785ccc1d2c440d4251df74c909964fd46f312 | Joe Wilm | 2016-09-17T03:24:37 | Add custom Debug for ext::Transition
This shows the variant in addition to the packed value - much more
helpful when debugging. | diff --git a/codegen/src/ext.rs b/codegen/src/ext.rs
index 0124435..94fdd51 100644
--- a/codegen/src/ext.rs
+++ b/codegen/src/ext.rs
@@ -1,3 +1,5 @@
+use std::fmt;
+
use syntex::Registry;
use syntex_syntax::ast::{self, ExprKind, MetaItem, Arm, Expr, PatKind, LitKind, Pat};
@@ -141,21 +143,35 @@ fn input_mapping_fro... | 1 | 21 | 5 |
fd3e43699f48c2c6a4912714e88372a19cc1f928 | Joe Wilm | 2016-09-13T04:21:31 | Finish Transition parser | diff --git a/codegen/src/ext.rs b/codegen/src/ext.rs
index 3a08935..8c63325 100644
--- a/codegen/src/ext.rs
+++ b/codegen/src/ext.rs
@@ -39,6 +39,29 @@ fn state_from_str<S>(s: &S) -> Result<State, ()>
})
}
+fn action_from_str<S>(s: &S) -> Result<Action, ()>
+ where S: AsRef<str>
+{
+ Ok(match s.as_ref() {... | 1 | 85 | 1 |
75abafa8a6db579ce973afe78b4262efacbb4694 | Martin Pool | 2026-02-10T15:32:54 | impl From<FileTime> for SystemTime (#119) | diff --git a/src/lib.rs b/src/lib.rs
index 95ea5d4..2d76f2a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -228,6 +228,18 @@ impl From<SystemTime> for FileTime {
}
}
+impl From<FileTime> for SystemTime {
+ fn from(time: FileTime) -> SystemTime {
+ let seconds = time.unix_seconds();
+ if seconds < ... | 1 | 38 | 10 |
06a6f24dbb080e91f3806bc41eadaa67546db51e | ChanTsune | 2026-02-03T00:45:47 | use `libc::UTIME_OMIT` (#117)
On Solaris, `set_file_mtime()` and other functions that use `UTIME_OMIT` fail with `EINVAL` (Invalid argument) because an incorrect value is used for the `UTIME_OMIT` constant.
To fix this issue, switch to using `libc::UTIME_OMIT`
- macOS
https://github.com/rust-lang/libc/blob/e4db084... | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index f5a48b2..c8ead32 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -1,5 +1,5 @@
use crate::FileTime;
-use libc::{time_t, timespec};
+use libc::{time_t, timespec, UTIME_OMIT};
use std::fs;
use std::os::unix::prelude::*;
@@ -33,31 +33,6 @@ cfg_if::cfg_if! {
... | 1 | 1 | 26 |
cca080e562c1afc12100b12c2d0d633c59cd532d | Alex Crichton | 2026-01-18T21:06:49 | Bump to 0.2.27 | diff --git a/Cargo.toml b/Cargo.toml
index 94a3d73..cf6dc45 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.26"
+version = "0.2.27"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
39f812defe8f163ee90d3ae832829187ee6ea541 | Alex Crichton | 2025-12-11T12:26:28 | Remove windows-sys dependency (#115)
I'd prefer to minimize maintenance necessary on this crate so drop the
dependency in favor of copying in definitions locally to avoid having to
keep up-to-date with the crate as it changes over time. | diff --git a/Cargo.toml b/Cargo.toml
index c61bf54..94a3d73 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,13 +19,6 @@ cfg-if = "1.0.0"
[target.'cfg(unix)'.dependencies]
libc = "0.2.27"
-[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.60.0"
-features = [
- "Win32_Foundation",
- "Win32_Storage_... | 2 | 21 | 9 |
28e0c73edf24584fcd6c75388aa359715c62a1a7 | Alex Crichton | 2025-08-20T16:11:58 | Bump to 0.2.26 | diff --git a/Cargo.toml b/Cargo.toml
index 29489c5..c61bf54 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.25"
+version = "0.2.26"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
75f33525863b8c61f8b4cb627cf106761ea42d6f | LongYinan | 2025-08-20T15:49:37 | Update windows-rs crate (#111) | diff --git a/Cargo.toml b/Cargo.toml
index 12461fa..29489c5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.59.0"
+version = "0.60.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
f5241bc462e2a605c9ef3cef40996431b67e79f5 | Alex Crichton | 2024-08-27T20:40:51 | Bump to 0.2.25 | diff --git a/Cargo.toml b/Cargo.toml
index f01193d..12461fa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.24"
+version = "0.2.25"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
6c442d13a950337661d5cbb8dbbb35bdfa1d0415 | Jeremy Soller | 2024-08-27T14:37:10 | redox: relax type requirement for tv_nsec, fixing x86 32-bit (#104) | diff --git a/src/redox.rs b/src/redox.rs
index 3b96465..7d1a6ea 100644
--- a/src/redox.rs
+++ b/src/redox.rs
@@ -84,7 +84,7 @@ fn set_file_times_redox(fd: usize, atime: FileTime, mtime: FileTime) -> io::Resu
fn to_timespec(ft: &FileTime) -> TimeSpec {
TimeSpec {
tv_sec: ft.seconds(),
- ... | 1 | 1 | 1 |
256dfa60630eb9cb26864705dc8c0d350cd2d835 | Alex Crichton | 2024-08-09T06:43:43 | Bump to 0.2.24 | diff --git a/Cargo.toml b/Cargo.toml
index f9586ae..f01193d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.23"
+version = "0.2.24"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
5ed97a1d1607a4ee3fcc013a812d8c0ceb4080df | Taiki Endo | 2024-08-09T06:43:12 | Update windows-sys to 0.59 (#108) | diff --git a/Cargo.toml b/Cargo.toml
index c02d837..f9586ae 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.52.0"
+version = "0.59.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
10d8acfeff6cb1657b01db2b7a6a34474e46d0ea | 4lDO2 | 2024-01-17T15:53:18 | Replace redox_syscall with libredox. (#103) | diff --git a/Cargo.toml b/Cargo.toml
index 725a9d5..c02d837 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ features = [
]
[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.4.1"
+libredox = "0.1.0"
[dev-dependencies]
tempfile = "3"
diff --git a/src/redox.rs b/src/redox.rs
index b18... | 2 | 44 | 49 |
3e0deed809246017505d8a9a904c18ae64d8596b | Alex Crichton | 2023-12-05T16:37:58 | Bump to 0.2.23 | diff --git a/Cargo.toml b/Cargo.toml
index 8d2d81c..725a9d5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.22"
+version = "0.2.23"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
c681afa9df473673ce8ad3da2d7ed66be3692c0d | Alain Φογτια Zscheile | 2023-12-05T16:37:21 | unix/birthtime: use broad support of libstd (#100) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index df62de4..f5a48b2 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -85,34 +85,17 @@ pub fn from_last_access_time(meta: &fs::Metadata) -> FileTime {
}
pub fn from_creation_time(meta: &fs::Metadata) -> Option<FileTime> {
- macro_rules! birthtim {
- ($... | 1 | 10 | 27 |
d31dc01d6cadbfcb1cbef2a2a7f76a736d635f5d | Luke Parker | 2023-12-05T16:33:05 | windows-sys 0.52 (#102) | diff --git a/Cargo.toml b/Cargo.toml
index 6783691..9f408c3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.48.0"
+version = "0.52.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
1d658de4fa116091307d120dc2e407dea93d5cbd | Alex Crichton | 2023-08-05T16:33:27 | Bump to 0.2.22 | diff --git a/Cargo.toml b/Cargo.toml
index 9bbcb12..6783691 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.21"
+version = "0.2.22"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
ed8558c5e6d3ae2dfde8a7214e52e9e4ad6e349d | nickelc | 2023-04-10T14:33:28 | Update `redox_syscall` to 0.3.5 (#97) | diff --git a/Cargo.toml b/Cargo.toml
index 71131e3..9bbcb12 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,7 +27,7 @@ features = [
]
[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.2.9"
+redox_syscall = "0.3.5"
[dev-dependencies]
tempfile = "3" | 1 | 1 | 1 |
05d09524fc4939b18851ddbec721b64ea1188d15 | Alex Crichton | 2023-04-05T18:08:29 | Bump to 0.2.21 | diff --git a/Cargo.toml b/Cargo.toml
index 47a5663..71131e3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.20"
+version = "0.2.21"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
dc2a6b9dd85ddc4340d4d6d803b4d9c241e80aa8 | nickelc | 2023-04-05T18:08:16 | Update `windows-sys` to 0.48 (#96)
* Update `windows-sys` to 0.48
* trigger ci | diff --git a/Cargo.toml b/Cargo.toml
index 280313a..47a5663 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.45.0"
+version = "0.48.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
5eec5a5547b0fb67a3ed795db9da8e0c360c0009 | Alex Crichton | 2023-02-08T14:58:29 | Bump to 0.2.20 | diff --git a/Cargo.toml b/Cargo.toml
index dce9909..280313a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.19"
+version = "0.2.20"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
ce3e203fe14edda3eaa9af650b333e4aad93dc6d | messense | 2023-02-08T14:58:11 | Update windows-sys to 0.45.0 (#94)
https://github.com/microsoft/windows-rs/releases/tag/0.45.0 | diff --git a/Cargo.toml b/Cargo.toml
index 66dc3eb..dce9909 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.42.0"
+version = "0.45.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
1df0704e39ab951b669f4acc4128db0c7c16863e | Alex Crichton | 2022-12-07T15:57:38 | Bump to 0.2.19 | diff --git a/Cargo.toml b/Cargo.toml
index fd434a0..66dc3eb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.18"
+version = "0.2.19"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
bcce691b91228c12a5147901484d02b62c30b55e | Wesley Wiser | 2022-12-07T15:57:15 | Update use of libc::timespec to prepare for future libc version (#91)
In a future release of the `libc` crate, `libc::timespec` will contain
private padding fields on `*-linux-musl` targets and so the struct will
no longer be able to be created using the literal initialization syntax.
Update struct literal use of... | diff --git a/src/unix/linux.rs b/src/unix/linux.rs
index c803e02..255fcfb 100644
--- a/src/unix/linux.rs
+++ b/src/unix/linux.rs
@@ -34,6 +34,11 @@ pub fn set_file_handle_times(
static INVALID: AtomicBool = AtomicBool::new(false);
if !INVALID.load(SeqCst) {
let times = [super::to_timespec(&atime), su... | 2 | 31 | 17 |
d57bd40f29744786939c8a438643de392de94585 | Alex Crichton | 2022-10-20T14:35:02 | Bump to 0.2.18 | diff --git a/Cargo.toml b/Cargo.toml
index 58dae17..fd434a0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.17"
+version = "0.2.18"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
b3be99cc1317a5a45c1e879195b9e63c1cda9ec6 | messense | 2022-10-19T13:45:32 | Update windows-sys to 0.42.0 (#89) | diff --git a/Cargo.toml b/Cargo.toml
index 09419c4..58dae17 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ cfg-if = "1.0.0"
libc = "0.2.27"
[target.'cfg(windows)'.dependencies.windows-sys]
-version = "0.36.0"
+version = "0.42.0"
features = [
"Win32_Foundation",
"Win32_Storage_FileSystem" | 1 | 1 | 1 |
83b031d66828fb989712f1084654b091d43e24a8 | xzfc | 2022-09-26T14:28:40 | Emscripten support (#88)
* Use unix implementation for emscripten target
* Emscripten: do not call utimensat() with flags
Emscripten do not support calling utimensat() with AT_SYMLINK_NOFOLLOW
flag. [1] To avoid crash, return an error instead.
[1]: https://github.com/emscripten-core/emscripten/blob/3.1.22/sr... | diff --git a/src/lib.rs b/src/lib.rs
index a4d9155..95ea5d4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -47,7 +47,7 @@ cfg_if::cfg_if! {
} else if #[cfg(windows)] {
#[path = "windows.rs"]
mod imp;
- } else if #[cfg(target_family = "wasm")] {
+ } else if #[cfg(all(target_family = "wasm", not... | 2 | 7 | 1 |
0e0876eaef8a0745cac7a1015272de5c7a82abe1 | bzEq | 2022-09-07T14:01:57 | [AIX] Adjust test to reflect query pre-unix epoch behavior on AIX (#87)
* Query pre-unix epoch hits invalid argument on AIX, adjust test to
get it passed on AIX.
* Use `if cfg!(...)` | diff --git a/src/lib.rs b/src/lib.rs
index 594d8a8..a4d9155 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -561,11 +561,18 @@ mod tests {
set_file_times(&path, atime, mtime).unwrap();
let new_mtime = FileTime::from_unix_time(-10_000, 0);
- set_file_times(&path, atime, new_mtime).unwrap();
+ ... | 1 | 11 | 4 |
e7b17feb91c231f9eda3389a21b4b9c50ada7fc9 | bzEq | 2022-09-06T14:07:42 | IIUC, we are setting the timestamp of the symlink file rather than (#86)
the target file. So the flag should be `true` as linux. | diff --git a/src/unix/utimensat.rs b/src/unix/utimensat.rs
index 42a1ada..d218c52 100644
--- a/src/unix/utimensat.rs
+++ b/src/unix/utimensat.rs
@@ -32,7 +32,7 @@ pub fn set_file_handle_times(
}
pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> {
- set_times(p, Some(atim... | 1 | 1 | 1 |
41462d73b4e2acfb80edf5344dc532acad102934 | bzEq | 2022-09-01T15:17:01 | Add support for AIX (#85) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 66f9fc2..8b77888 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -15,7 +15,8 @@ cfg_if::cfg_if! {
mod utimes;
mod macos;
pub use self::macos::*;
- } else if #[cfg(any(target_os = "solaris",
+ } else if #[cfg(any(target_os = "aix... | 1 | 6 | 1 |
c16f36ecb2aad92ce23c0326405dedeec2c9fab6 | Alex Crichton | 2022-07-01T20:56:32 | Bump to 0.2.17 | diff --git a/Cargo.toml b/Cargo.toml
index f28226b..09419c4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.16"
+version = "0.2.17"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
d1b2ff67466e9bd55bcddec425afa7643d3fc00d | Dan Gohman | 2022-07-01T20:55:17 | Migrate from winapi to windows-sys. (#81)
This PR migrates remove-dir-all from winapi to windows-sys.
Windows-sys is actively maintained, by Microsoft, and has recently
started to be adopted in the ecosystem; mio, parking_lot, wasmtime,
and others have moved to windows-sys. | diff --git a/Cargo.toml b/Cargo.toml
index 4ae62b1..f28226b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,8 +19,12 @@ cfg-if = "1.0.0"
[target.'cfg(unix)'.dependencies]
libc = "0.2.27"
-[target.'cfg(windows)'.dependencies]
-winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
+[target.'cfg... | 2 | 11 | 8 |
366c4592fa03ddd553d3a6631df918a7c8e79278 | Johnathan Sharratt | 2022-05-26T17:54:34 | Added compilability for target_arch=wasm64 (#79) | diff --git a/src/lib.rs b/src/lib.rs
index 817915c..594d8a8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -47,7 +47,7 @@ cfg_if::cfg_if! {
} else if #[cfg(windows)] {
#[path = "windows.rs"]
mod imp;
- } else if #[cfg(target_arch = "wasm32")] {
+ } else if #[cfg(target_family = "wasm")] {
... | 1 | 1 | 1 |
ed67ef1bb45e09cbec600dace88dadf8ddbb6923 | Justin Tracey | 2022-04-15T17:37:25 | Bump to 0.2.16 (#78) | diff --git a/Cargo.toml b/Cargo.toml
index 73bd23c..4ae62b1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.15"
+version = "0.2.16"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
edfb8031dace7ec12eb5bbbfe3eab287de23fbcb | Justin Tracey | 2022-04-11T14:03:20 | fix Android symlink flag (#77) | diff --git a/src/unix/android.rs b/src/unix/android.rs
index 59ef648..afcd448 100644
--- a/src/unix/android.rs
+++ b/src/unix/android.rs
@@ -37,7 +37,7 @@ pub fn set_file_handle_times(
}
pub fn set_symlink_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> {
- set_times(p, Some(atime), Some... | 1 | 1 | 1 |
4bf69e074b288cd99965884c4501aa198efe9e3c | Alain Zscheile | 2021-12-13T15:34:28 | mark some functions as `const fn`, and some fix compiler warnings (#75)
* mark fixed init functions and getters as const
* fix compiler warnings | diff --git a/src/lib.rs b/src/lib.rs
index e29050e..817915c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -71,14 +71,14 @@ impl FileTime {
/// Creates a new timestamp representing a 0 time.
///
/// Useful for creating the base of a cmp::max chain of times.
- pub fn zero() -> FileTime {
+ pub const fn... | 2 | 8 | 7 |
bb4058bf5ef15476ac6c4a49e2bb08f7bf81dc90 | Jeremy Soller | 2021-08-09T14:10:03 | Bump to 0.2.15 (#72) | diff --git a/Cargo.toml b/Cargo.toml
index a8e35b5..73bd23c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.14"
+version = "0.2.15"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
238928084b5b94b177d689cf84100c521adfb7d3 | 4lDO2 | 2021-06-17T14:40:40 | Update redox_syscall to 0.2.9 (#71) | diff --git a/Cargo.toml b/Cargo.toml
index 3556de7..a8e35b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ libc = "0.2.27"
winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.2.8"
+redox_syscall = "0.2.9"
[d... | 1 | 1 | 1 |
d3e643999586981ba78f33e2f6cffd2fb6e982aa | Mitchell Mebane | 2021-06-01T14:09:44 | Fix typos in macos.rs (#69)
futimens / utimensat were added in 10.13, not 10.3. | diff --git a/src/unix/macos.rs b/src/unix/macos.rs
index 9ea8dc7..efe92d4 100644
--- a/src/unix/macos.rs
+++ b/src/unix/macos.rs
@@ -1,5 +1,5 @@
-//! Beginning with MacOS 10.3, `utimensat` is supported by the MacOS, so here, we check if the symbol exists
-//! and if not, we fallabck to `utimes`.
+//! Beginning with mac... | 1 | 2 | 2 |
154976cfd5409b4106750edcf5936bd360ff819e | Alex Crichton | 2021-06-01T14:09:33 | Run rustfmt | diff --git a/src/redox.rs b/src/redox.rs
index 2c93f52..b189ea5 100644
--- a/src/redox.rs
+++ b/src/redox.rs
@@ -5,16 +5,14 @@ use std::os::unix::prelude::*;
use std::path::Path;
pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> {
- let fd = open_redox(p, 0)
- .map_err(|e... | 1 | 3 | 6 |
4414818daeba4e91e29494d82b90025549008f36 | Jeremy Soller | 2021-05-06T14:14:09 | Adapt to UTF-8 only paths in redox_syscall 0.2.8 (#68) | diff --git a/Cargo.toml b/Cargo.toml
index 5004711..3556de7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ libc = "0.2.27"
winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.2"
+redox_syscall = "0.2.8"
[dev... | 2 | 12 | 5 |
ff117fb69abdb819ff715fd7adde86db6849fd19 | Alex Crichton | 2021-01-21T16:09:50 | Bump to 0.2.14 | diff --git a/Cargo.toml b/Cargo.toml
index bfb7702..5004711 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.13"
+version = "0.2.14"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
a96d95d5de989092a17cef69d28fd43af0e498be | Alex Crichton | 2021-01-21T16:09:39 | Update redox_syscall dependency | diff --git a/Cargo.toml b/Cargo.toml
index 24a88f1..bfb7702 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ libc = "0.2.27"
winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.1"
+redox_syscall = "0.2"
[dev-d... | 1 | 1 | 1 |
b0525c8dd36101e51371c8549c361c7c05a6c224 | Alex Crichton | 2020-11-05T16:12:39 | Bump to 0.2.13 | diff --git a/Cargo.toml b/Cargo.toml
index 1fbb4bf..24a88f1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.12"
+version = "0.2.13"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
958960658d60c97eb76baebaa7de8d4da2a733ea | frnky | 2020-10-11T21:23:59 | Setting UTIME_OMIT correctly for FreeBSD, Haiku and Illumos (#65) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index af169a3..66f9fc2 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -33,13 +33,22 @@ cfg_if::cfg_if! {
#[allow(dead_code)]
fn to_timespec(ft: &Option<FileTime>) -> timespec {
cfg_if::cfg_if! {
- if #[cfg(target_os = "macos")] {
+ if #[cfg(any(... | 1 | 10 | 1 |
80f21bb8f06ae37d9b3cda49643d9ac782481f67 | Alex Crichton | 2020-08-03T15:43:47 | Bump to 0.2.12 | diff --git a/Cargo.toml b/Cargo.toml
index 6f5e602..1479a64 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.11"
+version = "0.2.12"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
72eadb037a9abdba6a2e783ce04b2a0ab001f89b | Peter H. Ezetta | 2020-07-30T14:01:45 | Setting UTIME_OMIT correctly for OpenBSD (#60) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index ad414a1..3b739d2 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -37,6 +37,9 @@ fn to_timespec(ft: &Option<FileTime>) -> timespec {
if #[cfg(target_os = "macos")] {
// https://github.com/apple/darwin-xnu/blob/a449c6a3b8014d9406c2ddbdc81795... | 1 | 3 | 0 |
85d23fda97cae19e6ee0612c7f86a7f03e411f98 | Alex Crichton | 2020-07-29T20:33:44 | Bump to 0.2.11 | diff --git a/Cargo.toml b/Cargo.toml
index 16e311e..6f5e602 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.10"
+version = "0.2.11"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mti... | 1 | 1 | 1 |
33f8ccbe1394948c71b18b85784f7b58cc01a8a4 | link2xt | 2020-07-29T20:33:28 | Use utimensat instead of futimens only on android (#59) | diff --git a/src/unix/android.rs b/src/unix/android.rs
new file mode 100644
index 0000000..59ef648
--- /dev/null
+++ b/src/unix/android.rs
@@ -0,0 +1,63 @@
+use crate::FileTime;
+use std::ffi::CString;
+use std::fs::File;
+use std::io;
+use std::os::unix::prelude::*;
+use std::path::Path;
+
+pub fn set_file_times(p: &P... | 3 | 69 | 3 |
7443ddc1cf57c567a84d442b5b4f53efd124df96 | link2xt | 2020-07-29T16:30:23 | utimensat.rs: remove use of futimens (#57)
futimens is not available in Android NDK before version 19:
https://stackoverflow.com/questions/19374749/how-to-work-around-absence-of-futimes-in-android-ndk
The reason is that bionic libc didn't implement this wrapper for
utimensat.
utimensat syscall was available be... | diff --git a/src/unix/utimensat.rs b/src/unix/utimensat.rs
index 42a1ada..986a749 100644
--- a/src/unix/utimensat.rs
+++ b/src/unix/utimensat.rs
@@ -23,7 +23,7 @@ pub fn set_file_handle_times(
mtime: Option<FileTime>,
) -> io::Result<()> {
let times = [super::to_timespec(&atime), super::to_timespec(&mtime)];... | 1 | 1 | 1 |
487c47d0a5f287564da8e9acd1cd5dd5a5f7869c | mark4o | 2020-06-23T15:48:46 | Complete Redox implementation (#55) | diff --git a/src/redox.rs b/src/redox.rs
index f06c271..a9ed253 100644
--- a/src/redox.rs
+++ b/src/redox.rs
@@ -7,29 +7,75 @@ use std::path::Path;
pub fn set_file_times(p: &Path, atime: FileTime, mtime: FileTime) -> io::Result<()> {
let fd = syscall::open(p.as_os_str().as_bytes(), 0)
.map_err(|err| io::... | 1 | 61 | 17 |
7e01e2d9620466e84d5f945b45f969cb2b6eb69a | Alex Crichton | 2020-05-07T14:27:58 | Bump to 0.2.10 | diff --git a/Cargo.toml b/Cargo.toml
index e425ac2..16e311e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.9"
+version = "0.2.10"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mtim... | 1 | 1 | 1 |
2529df8b522278d0434ea439d3f3b15be3c8c5a6 | Ilaï Deutel | 2020-05-06T14:26:21 | Fix PermissionDenied error with Windows folders (#54)
* Fix PermissionDenied error with Windows folders
* Add tests for setting directory times | diff --git a/src/lib.rs b/src/lib.rs
index a2ca0cc..e29050e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -301,7 +301,10 @@ where
#[cfg(test)]
mod tests {
- use super::{set_file_handle_times, set_file_times, set_symlink_file_times, FileTime};
+ use super::{
+ set_file_atime, set_file_handle_times, set_fi... | 2 | 146 | 9 |
0aa333346862949332ef5200ece85d6325170080 | Alex Crichton | 2020-04-01T13:53:40 | Bump to 0.2.9 | diff --git a/Cargo.toml b/Cargo.toml
index 3426178..e425ac2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.8"
+version = "0.2.9"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mtime... | 1 | 1 | 1 |
e7bafada4e86992f40bc920abbbea8a79d882e34 | Niels Sascha Reedijk | 2020-04-01T13:53:22 | Haiku: use the utimensat module (#53) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index ce75d77..ded9c88 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -18,7 +18,8 @@ cfg_if::cfg_if! {
target_os = "emscripten",
target_os = "freebsd",
target_os = "netbsd",
- ... | 1 | 2 | 1 |
937aa81f320078ba76021ec112df2e01671f58d8 | Patrick Mooney | 2020-03-26T15:29:30 | Add illumos target support (#51) | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 37bf792..ce75d77 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -14,6 +14,7 @@ cfg_if::cfg_if! {
pub use self::macos::*;
} else if #[cfg(any(target_os = "android",
target_os = "solaris",
+ target_os... | 1 | 1 | 0 |
033b3ee0fc709a66d8a63c5548c94d17f53f75a8 | David Tolnay | 2020-02-29T02:03:45 | Add FileTime::now() (#50) | diff --git a/src/lib.rs b/src/lib.rs
index 5ee4373..a2ca0cc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -89,6 +89,25 @@ impl FileTime {
}
}
+ /// Creates a new timestamp representing the current system time.
+ ///
+ /// ```
+ /// # use filetime::FileTime;
+ /// #
+ /// # fn example() -... | 1 | 19 | 0 |
2c0e61d8b5317913cbb85912619252379ed4cc3a | Ryan Plauche | 2020-02-18T14:32:49 | Adding support for uclibc's funtimens in set_file_handle_times (#49)
* Adding support for uclibc's funtimens in set_file_handle_times
* Fixing timespec's tv_nsec for macos. Borrowing from libc. | diff --git a/src/unix/utimes.rs b/src/unix/utimes.rs
index c3de5fd..9926921 100644
--- a/src/unix/utimes.rs
+++ b/src/unix/utimes.rs
@@ -20,6 +20,7 @@ pub fn set_file_atime(p: &Path, atime: FileTime) -> io::Result<()> {
set_times(p, Some(atime), None, false)
}
+#[cfg(not(target_env = "uclibc"))]
#[allow(dead_c... | 1 | 31 | 0 |
76da827f1391fa2f26a8812acae2a4f2a306aa99 | Alex Crichton | 2019-11-11T14:57:05 | Run rustfmt | diff --git a/src/redox.rs b/src/redox.rs
index da2408a..f06c271 100644
--- a/src/redox.rs
+++ b/src/redox.rs
@@ -1,8 +1,8 @@
+use crate::FileTime;
use std::fs::{self, File};
use std::io;
use std::os::unix::prelude::*;
use std::path::Path;
-use crate::FileTime;
pub fn set_file_times(p: &Path, atime: FileTime, mti... | 2 | 6 | 8 |
0951c8664edce7435a6ec91724b627fd8946948c | Alex Crichton | 2019-11-11T14:43:13 | Bump to 0.2.8 | diff --git a/Cargo.toml b/Cargo.toml
index ef13bf3..3426178 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.7"
+version = "0.2.8"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mtime... | 1 | 1 | 1 |
e0af22f1844c9d99984839efba2a898483319efe | Ben Boeckel | 2019-10-26T21:32:47 | libc: require 0.2.27
Needed for `libc::SYS_utimensat`. | diff --git a/Cargo.toml b/Cargo.toml
index 29a55b5..ef13bf3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,7 +17,7 @@ edition = "2018"
cfg-if = "0.1.6"
[target.'cfg(unix)'.dependencies]
-libc = "0.2"
+libc = "0.2.27"
[target.'cfg(windows)'.dependencies]
winapi = { version = '0.3', features = ['fileapi', 'minwi... | 1 | 1 | 1 |
fe5e91fba4025beb57612614ffc534a52ad20efd | Ben Boeckel | 2019-10-26T21:27:33 | cfg-if: require 0.1.6 | diff --git a/Cargo.toml b/Cargo.toml
index 4ddd747..29a55b5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,7 +14,7 @@ Platform-agnostic accessors of timestamps in File metadata
edition = "2018"
[dependencies]
-cfg-if = "0.1"
+cfg-if = "0.1.6"
[target.'cfg(unix)'.dependencies]
libc = "0.2" | 1 | 1 | 1 |
6ae857d3f2ccc0b0e32af771c336a9ceb716beeb | Wolfgang Silbermayr | 2019-08-18T05:34:23 | Migrate tempdir dep to tempfile
The tempdir crate has been deprecated by their author in favor of using
the tempfile crate. | diff --git a/Cargo.toml b/Cargo.toml
index 7548998..4ddd747 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,4 +26,4 @@ winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
redox_syscall = "0.1"
[dev-dependencies]
-tempdir = "0.3"
+tempfile = "3"
diff --git a/src/lib.rs b/src/lib.rs
index 9f7... | 2 | 7 | 7 |
e5e6fc06b243938b90da23d362406e449d1ff7bf | Jakub Konka | 2019-08-14T13:22:57 | Update crate version in docs
Now, matches the actual version of the crate which is `0.2`. | diff --git a/src/lib.rs b/src/lib.rs
index 4902cb9..9f7f71b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,7 +9,7 @@
//!
//! ```toml
//! [dependencies]
-//! filetime = "0.1"
+//! filetime = "0.2"
//! ```
//!
//! # Usage | 1 | 1 | 1 |
36f39ce71d519a23ba73b66721ce6eb4e8360226 | Alex Crichton | 2019-08-13T15:41:58 | Bump to 0.2.7 | diff --git a/Cargo.toml b/Cargo.toml
index 5b071e5..7548998 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.6"
+version = "0.2.7"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mtime... | 1 | 1 | 1 |
e4ecbfd3ffd8188bb58b6f5cf3b1a0943918049a | Alex Crichton | 2019-08-13T14:44:10 | Share common code loading symbols | diff --git a/src/unix/macos.rs b/src/unix/macos.rs
index 4402e5e..03029a1 100644
--- a/src/unix/macos.rs
+++ b/src/unix/macos.rs
@@ -2,7 +2,7 @@
//! and if not, we fallabck to `utimes`.
use crate::FileTime;
use libc::{c_char, c_int, timespec};
-use std::ffi::CString;
+use std::ffi::{CString, CStr};
use std::fs::Fil... | 1 | 23 | 29 |
abaf0223b1aaf820d6f14fe39ee380c9f80057e2 | Alex Crichton | 2019-08-13T14:40:21 | Skip second `INVALID` static
We've already got one for the symbol address so no need to make a cache
for that one too. | diff --git a/src/unix/macos.rs b/src/unix/macos.rs
index bd38b45..4402e5e 100644
--- a/src/unix/macos.rs
+++ b/src/unix/macos.rs
@@ -7,7 +7,7 @@ use std::fs::File;
use std::os::unix::prelude::*;
use std::path::Path;
use std::sync::atomic::Ordering::SeqCst;
-use std::sync::atomic::{AtomicBool, AtomicUsize};
+use std:... | 1 | 19 | 29 |
3576c6abbd41a2b18fafb867358abe40c3ece46f | Alex Crichton | 2019-05-15T17:18:45 | Bump to 0.2.6 | diff --git a/Cargo.toml b/Cargo.toml
index 698b0d2..5b071e5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "filetime"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
-version = "0.2.5"
+version = "0.2.6"
license = "MIT/Apache-2.0"
readme = "README.md"
keywords = ["timestamp", "mtime... | 1 | 1 | 1 |
3c9c3f9c96186ddcb826e6c0a8256a1087eddc1e | Alex Crichton | 2019-05-15T17:12:43 | Enable the new test on all platforms | diff --git a/src/lib.rs b/src/lib.rs
index a4e0408..28b8108 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -522,18 +522,6 @@ mod tests {
}
#[test]
- #[cfg(all(
- feature = "utimensat",
- any(
- target_os = "linux",
- target_os = "android",
- target_os = "solari... | 1 | 0 | 12 |
e7a6cea68279ac013099fe137ec9a94c17fd3811 | Alex Crichton | 2019-05-15T17:04:41 | Provide a uniform and consistent interface
Avoid crate features, `#[cfg]`'d APIs, and hidden unwraps. | diff --git a/Cargo.toml b/Cargo.toml
index 64686ff..99fe0a0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,14 +18,11 @@ cfg-if = "0.1"
[target.'cfg(unix)'.dependencies]
libc = "0.2"
+[target.'cfg(windows)'.dependencies]
+winapi = { version = '0.3', features = ['fileapi', 'minwindef', 'winbase'] }
+
[target.'cfg(t... | 9 | 246 | 233 |
c05ad3c139d5735ce16b480a223d9653c979d0cb | Alex Crichton | 2019-05-15T16:29:24 | Run rustfmt over `src/unix/mod.rs` | diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 9e17cc5..ae71633 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -6,8 +6,8 @@ use std::io;
use std::os::unix::prelude::*;
use std::path::Path;
-use self::libc::{c_int, c_char, timeval, time_t, suseconds_t};
-use self::libc::{timespec};
+use self::libc::time... | 1 | 35 | 33 |
2e494fbcd4b60bd6041bb6067573768c19676fa6 | Alex Crichton | 2019-05-15T16:24:46 | Use `libc::syscall` instead of `dlsym`
This is a bit more robust since it doesn't rely on glibc and also works
for platforms like musl where `dlsym` doesn't always work. | diff --git a/src/unix/linux.rs b/src/unix/linux.rs
index 1f1a3fb..57f1904 100644
--- a/src/unix/linux.rs
+++ b/src/unix/linux.rs
@@ -2,57 +2,54 @@
//! always available so we also fall back to `utimes` if we couldn't find
//! `utimensat` at runtime.
+use std::ffi::CString;
+use std::ptr;
use std::fs;
use std::io;
... | 2 | 68 | 129 |
95bbd6351a6f3766e430cba911c3c88115fbb6a0 | Alex Crichton | 2019-05-15T16:06:50 | Remove usage of deprecated constants | diff --git a/src/unix/linux.rs b/src/unix/linux.rs
index 8fb28a3..1f1a3fb 100644
--- a/src/unix/linux.rs
+++ b/src/unix/linux.rs
@@ -6,8 +6,7 @@ use std::fs;
use std::io;
use std::mem;
use std::path::Path;
-use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
-use std::sync::atomic::{AtomicBool, ATOMIC... | 1 | 13 | 14 |
fd8b68d1ac5d938f986c0de8d306abad6c2c7234 | Robert Collins | 2019-05-15T04:59:11 | Bug #28: Add set_file_handle_times
I have matched the new API present in #36 for the new function so
that when that is merged the API will be nice and regular.
Large delta due to cargo fmt - let me know if you want me to
disable that for this project or something... | diff --git a/src/lib.rs b/src/lib.rs
index 6bb8a24..6db70f3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -75,12 +75,18 @@ impl FileTime {
///
/// Useful for creating the base of a cmp::max chain of times.
pub fn zero() -> FileTime {
- FileTime { seconds: 0, nanos: 0 }
+ FileTime {
+ ... | 6 | 320 | 128 |
4718343fac3064ec6c265b8ccef5ce92af740dc2 | Anton Lazarev | 2019-01-01T03:04:03 | fix cfg attributes for macos and others | diff --git a/src/lib.rs b/src/lib.rs
index 9826725..6bb8a24 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -229,7 +229,14 @@ pub fn set_symlink_file_times<P>(p: P, atime: FileTime, mtime: FileTime)
///
/// Currently only supported on Unix platforms with the `utimensat` feature
/// enabled.
-#[cfg(all(feature = "utimens... | 2 | 30 | 5 |
9fe86210b42e1c42efbc9cb9a6a4a32714cd508c | Anton Lazarev | 2019-01-01T02:35:21 | add opt-in utimensat feature | diff --git a/Cargo.toml b/Cargo.toml
index 2bffdb6..64686ff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,3 +23,9 @@ redox_syscall = "0.1"
[dev-dependencies]
tempdir = "0.3"
+
+[features]
+# On Unix platforms, forces the use of the `utimensat` syscall rather than the
+# older `utimes`. This will expose functions ... | 4 | 47 | 34 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.