Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

2010-06-05

Introducing the Dir-to-XML gem
Saturday, 05 June 2010 16:32
Use the Dir-to-XML gem to save a file directory listing to a Dynarex file.

*installation*

sudo gem1.9.1 install dir-to-xml

Successfully installed dir-to-xml-0.1.0
1 gem installed
Installing ri documentation for dir-to-xml-0.1.0...
Updating class cache with 3178 classes...
Installing RDoc documentation for dir-to-xml-0.1.0...


require 'dir-to-xml'

DirToXML.new
#=> #

file created: dir.xml



2010-06-05 | tag


fun.txt
file
.txt
2010-06-05 17:24:10 +0100
2010-06-05 17:24:10 +0100
2010-06-05 17:24:10 +0100



html
directory

2010-05-07 19:20:54 +0100
2010-05-07 19:20:54 +0100
2010-05-07 19:20:56 +0100



ruby
directory

2010-06-05 17:20:18 +0100
2010-06-05 17:20:18 +0100
2010-06-05 17:20:18 +0100



dir.xml

.xml
2010-06-05 18:19:03 +0100
2010-06-05 18:19:03 +0100
2010-06-05 18:19:03 +0100






Resources:
- Create a directory listing in XML format [dzone.com]
- jrobertson's dir-to-xml at master [github.com]

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/FC4XIehw2g0/11547

 
Fetching the File date attributes
Saturday, 05 June 2010 14:55
The following command can be used to find when a file was created, modified, or last accessed :

File::ctime( "dir.xml" )
#=> 2010-06-05 16:47:18 +0100
File::mtime( "dir.xml" )
#=> 2010-06-05 16:47:18 +0100
File::atime( "dir.xml" )
#=> 2010-06-05 16:47:28 +0100

Resources:
- Ruby File I/O, Directories [tutorialspoint.com]

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/sQNp3n10WNM/11545

 


Taxonomy by Zaragoza Online