Gets mtime of given `file` and adds it to metadata.

@param {String} file
@param {Function} done
@api private
490307
function getAddMtime(file, done) {
    fs.stat(path.join(source, file), addMtime);


    /**
     * Adds `stats.mtime` of `file` to its metadata.
     *
     * @param {Error} err
     * @param {fs.Stats} stats
     * @api private
     */

    function addMtime(err, stats) {
      if (err) {
        // Skip elements of `files` that don't point to existing files.
        // This can happen if some other Metalsmith plugin does something
        // strange with `files`.
        if (err.code === 'ENOENT') {
          debug('file %s not found', file);
          return done();
        }
        return done(err);
      }

      debug('mtime of file %s is %s', file, stats.mtime);
      files[file].mtime = stats.mtime;
      done();
    }
  }
690221
public function getFilemtimeMetadata($file, $default = 0)
    {
        $this->readMetadataFile();

        return isset($this->metadata[$file]['mt']) ? $this->metadata[$file]['mt'] : $default;
    }
360128
private static void copyMetadata(final File aFile, final Element aElement) {
        final SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT, Locale.US);
        final StringBuilder permissions = new StringBuilder();
        final Date date = new Date(aFile.lastModified());

        aElement.setAttribute(FILE_PATH, aFile.getAbsolutePath());
        aElement.setAttribute(MODIFIED, formatter.format(date));

        if (aFile.canRead()) {
            permissions.append('r');
        }

        if (aFile.canWrite()) {
            permissions.append('w');
        }

        aElement.setAttribute("permissions", permissions.toString());
    }
943618
private double getFileAge(File file) {
        final Date d = new Date();
        final long modified = file.lastModified();
        final double time = (d.getTime() - modified) / 1000.0 / 60.0;
        LOGGER.debug("Lock file age is {} minutes", time);
        return time;
    }
787621
function compareLastModifiedTime(stream, sourceFile, targetPath) {
	return stat(targetPath)
		.then(targetStat => {
			if (sourceFile.stat && sourceFile.stat.mtime > targetStat.mtime) {
				stream.push(sourceFile);
			}
		});
}
970724
static String getVersionForFile(final File file)  {
        try {
            final PluginMeta pluginMeta = loadMeta(file);
            return pluginMeta.getVersion();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }
800557
def mtime_including_imports(file)
      mtimes = [mtime(file)]
      File.readlines(file).each do |line|
        next unless line =~ /^\s*@import ['"]([^'"]+)/

        imported = File.join(File.dirname(file), Regexp.last_match[1])

        # complete path given ?
        mod_time = if imported =~ /\.le?ss$/
                     mtime(imported)
                   else
                     # we need to add .less or .lss
                     [mtime("#{imported}.less"), mtime("#{imported}.lss")].max
                   end
        mtimes << mod_time
      end
      mtimes.max
    end
160145
public function getFilemtimeCurrent($file)
    {
        if(is_readable($file) === false)
            return false;

        $time = filemtime($file);

        return $time ? $time : false;
    }
1127999
function(file, t) {
		var self = this, 
			ts   = t || file.ts, 
			i18  = self.i18,
			date, format, output, d, dw, m, y, h, g, i, s;

		if (self.options.clientFormatDate && ts > 0) {

			date = new Date(ts*1000);
			format = ts >= this.yesterday 
				? this.fancyFormat 
				: this.dateFormat;

			output = self.date(format, date);
			
			return ts >= this.yesterday
				? output.replace('$1', this.i18n(ts >= this.today ? 'Today' : 'Yesterday'))
				: output;
		} else if (file.date) {
			return file.date.replace(/([a-z]+)\s/i, function(a1, a2) { return self.i18n(a2)+' '; });
		}
		
		return self.i18n('dateUnknown');
	}
457563
function File(file) {
  this.cache = new Map();
  this.history = [];
  this.pattern = file.pattern;
  this.recurse = file.recurse;
  this.dirname = file.dirname;
  this.segment = file.segment;
  this.path = file.path;
  this.orig = file.path;
}
847951
def _get_mod_mtime(self, filepath):
        
        file_mtime = self.tramp.getmtime(filepath)        
        xmlpath = self.get_xmldoc_path(filepath)
        if self.tramp.exists(xmlpath):
            xml_mtime = self.tramp.getmtime(xmlpath)
            if xml_mtime > file_mtime:
                file_mtime = xml_mtime

        return file_mtime
1174747
function getFileMIME(file) {
  var idx = file.lastIndexOf('.')
  var ext = idx > -1 ? file.slice(idx) : null
  if (ext) ext = ext.toLowerCase().substring(1)
  return MIMES[ext] || MIMES.txt
}
960114
function (file) {
        if (!this.ignore(file)) {
            file = this.map(file);
            file = utils.normalize(file);
            return file;
        }
    }
466083
function(done) {
          gzip(info.filePath, info.gzFilePath, function() {
            info.gzTime = Date.now();
            // Open and read the size of the minified+gzip output
            readSize(info.gzFilePath, function(size) {
              info.gzSize = size;
              done();
            });
          });
        }
1050199
function addMtime(err, stats) {
      if (err) {
        // Skip elements of `files` that don't point to existing files.
        // This can happen if some other Metalsmith plugin does something
        // strange with `files`.
        if (err.code === 'ENOENT') {
          debug('file %s not found', file);
          return done();
        }
        return done(err);
      }

      debug('mtime of file %s is %s', file, stats.mtime);
      files[file].mtime = stats.mtime;
      done();
    }
828120
function(done) {
          readBuffer(info.filePath, function(data) {
            lzma.compress(data, 1, function(result, error) {
              if (error) {
                throw error;
              }
              writeBuffer(info.lzFilePath, new Buffer(result), function() {
                info.lzTime = Date.now();
                // Open and read the size of the minified+lzma output
                readSize(info.lzFilePath, function(size) {
                  info.lzSize = size;
                  done();
                });
              });
            });
          });
        }
1076968
function(file) {
        var self = this;

        return new Promise(function(resolve) {
            fs.readFileAsync(file, 'utf-8')
                .then(function(content) {
                    return self._parseFile(file, content);
                })
                .then(function(ast) {
                    return self._getConfig(file, ast);
                })
                .then(function(config) {
                    self._modules = self._modules.concat(config);

                    resolve(config);
                });
        });
    }