Windows/X-plaiform file path manipulation -- how do you deal with it?

G

Graham Wideman

Folks:

Could someone please straighten me out on how the Ruby community deals with
the simple issues of file names and path manipulation on Windows, preferably
in a cross platform way?

So far as I can tell, pathname.rb as distributed with 1.8.4 does not deal
with Windows paths.

(Comments within say it's unix-only, though the online docs at
http://www.ruby-doc.org/stdlib/ claim Windows support, but appear to be
extracted from wrong version of pathname.rb).

On the basis that there are many ruby programmers working on Windows and
presumably needing to actually work with files, I'm hesitant to conclude
that this area of functionality isn't covered somehow.

What gives?

Graham
 
G

Graham Wideman

.... so to partly answer myself, it looks like the
at-least-experimentally-working Pathname library is available in the 1.9
distribution, and indeed does what I want.

Leading to the next question posted...
 
D

Daniel Berger

Graham said:
Folks:

Could someone please straighten me out on how the Ruby community deals with
the simple issues of file names and path manipulation on Windows, preferably
in a cross platform way?

So far as I can tell, pathname.rb as distributed with 1.8.4 does not deal
with Windows paths.

(Comments within say it's unix-only, though the online docs at
http://www.ruby-doc.org/stdlib/ claim Windows support, but appear to be
extracted from wrong version of pathname.rb).

On the basis that there are many ruby programmers working on Windows and
presumably needing to actually work with files, I'm hesitant to conclude
that this area of functionality isn't covered somehow.

What gives?

Graham

Use pathname2 instead. Available on the RAA.

Regards,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top