Socket
Socket
Sign inDemoInstall

change-file-time

Package Overview
Dependencies
87
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    change-file-time

Removes or alters timestamps from files based on glob patterns


Version published
Weekly downloads
26
increased by13.04%
Maintainers
1
Install size
1.45 MB
Created
Weekly downloads
 

Readme

Source

change-file-time

A CLI application and Node module to change file timestamps.

Installation

Node Module:

$ npm install change-file-time

Cli:

$ npm install -g change-file-time

Node Usage

Changing a group of files to the current date/time:

const changeTime = require('change-file-time')

changeTime('/path/**/*.html', function(err){
	if(err) console.error(err)
	else console.log('Done!')
})

You can also supply options to supply different dates:

changeTime('/path/**/*.html', {
	atime: new Date(1995, 11, 17),
	ctime: new Date('1995-12-17T03:24:00'),
	mtime: new Date('December 17, 1995 03:24:00')
}, function(err){
	if(err) console.error(err)
	else console.log('Done!')
})

CLI

Usage
  $ cft <options>

Options
  -f, --files     Glob pattern for files, defaults to **/*
  -a, --atime     Timestamp for atime, defaults to time of execution
  -m, --mtime     Timestamp for mtime, defaults to time of execution
  -c, --ctime     Timestamp for ctime, defaults to time of execution
  -r, --recreate  Recreate files
  --verbose       Output debug information

FAQs

Last updated on 11 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc