0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Birthtime support for File and File::Stat.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

File birthtime extension for Ruby¶ ↑

This module extends core Ruby classes File and File::Stat with methods to query file birthtime (creation time).

Platforms¶ ↑

For now, only systems with field st_birthtime in struct stat (BSDs with UFS2 support).

Requirements¶ ↑

  • rubygem >= 1.2

  • working C compiler

Installation¶ ↑

If installing to $HOME

export RB_USER_INSTALL=true

From gem¶ ↑

gem install --source http://gems.github.com mwisnicki-ruby-file-birthtime

From source¶ ↑

git clone git://github.com/mwisnicki/ruby-file-birthtime.git
cd ruby-file-birthtime
gem build ruby-file-birthtime.gemspec
gem install file-birthtime-*.gem

Usage¶ ↑

require 'file_btime' # => true
File.btime('.') # => Tue Jun 16 15:07:21 0200 2009
File.new('.').btime # => Tue Jun 16 15:07:21 0200 2009
File.stat('.').btime # => Tue Jun 16 15:07:21 0200 2009

Returns nil if particular filesystem does not support birthtimes (st_birthtime<0).

TODO¶ ↑

  1. Add necessary checks to extconf.rb

  2. Port to other platforms - at least Win32, MacOSX, maybe Solaris (with ZFS).