Closed larvanitis closed 9 years ago
Is this specific to gulp-gzip
or gulp
as a whole? Just running something like gulp.src('*').pipe(gulp.dest('.'));
will modify mtime
.
Hmmm good question. My use case involves just the gzip part - ie I process all files and the last step before dest
is gzip. Are the times controllable by gulp or would a plugin have to do some magic changing them after the files have been written to the disk?
I think the timestamps will be updated for any file run through Gulp regardless of gulp-gzip
being included.
The only plugin I found that involves mtime
is gulp-rev-mtime, but that's not really what you're after. This might be a good idea for a new Gulp plugin!
The fs
module has a Stats class, which contains atime
, ctime
, and mtime
. That might be helpful.
Yeah, this isn't something a plugin can do. vinyl-fs, the vinyl adapter that gulp uses, doesn't support it.
In theory you could modify vinyl-fs so that the times are retained.
Would it be possible to add an option so that the
ctime
andmtime
of the created gz files match those of thesrc
file?