Ask a Question related to Ruby, Design and Development.
-
Sam Roberts #1
How can I marshall File::Stat, and do file tests?
Basically, I'm building a Hash of paths to their File::Stat, and
Marshal.dumping it. Later I'll load it, and
compare the current filesystem state to the state I saved.
Simple, right?
But, I can't marshall File::Stat, it's not allowed/supported.
Irritating, but no problem, I'll build a Struct with all the values from
the File::Stat that I want to save, and put that in the Hash instead,
right?
Well, that doesn't work so well, either. Now when I load that, I have
no way to construct a File::Stat out of my own data (it lacks a "new"),
and I lose all of File::Stats handy methods to see what kind of file it
is, and its permissions, etc.
Any suggestions? Can I define my own _load() and _dump() for File::Stat?
Is that the right way? Am I not allowed to marshall File::Stat because
its contents are system specific?
Thanks for any pointers on how to deal with this,
Sam
Sam Roberts Guest
-
Create tests using a data file for questions
Is it possible to pull questions from a data file into flash without having to create new frames for every question. This would be a multiple... -
problem in binding xml file data to datagrid xml file isgenerated through JSP file
problem it that i am creating xml file using JSP file and i want to bind DataGrid with xml file data that is created using JSP but it will not Bind... -
File Viewer / Bloated file sizes / What is the best file format?
I would like to find a viewer capable of looking at the main Adobe formats as well as the standard formats such as JPG and WMF ... but yet the only... -
[BUG] File#rewind, File#syswrite, File#pos on Cygwin build
On the cygwin build of ruby v1.8.0, I have encountered a strange bug when using rewind, syswrite and pos. If you open a file in read/write mode,... -
File.stat.blksize returns nil and not 0 on win2k
Hello, on the 1.8.0 ruby version of the pragprog installer, File.stat(file).blksize returns nil and not 0 on a windows 2k machine. According to... -
Sam Roberts #2
Re: How can I marshall File::Stat, and do file tests?
Seems to be a long-standing oddity, discussed in ruby-talk #74175 and
#74162, but I still can't find a resolution to it.
Still searching...
Sam
Quoteing [email]sroberts@uniserve.com[/email], on Sun, Nov 02, 2003 at 12:08:34PM +0900:> Basically, I'm building a Hash of paths to their File::Stat, and
> Marshal.dumping it. Later I'll load it, and
> compare the current filesystem state to the state I saved.
>
> Simple, right?
>
> But, I can't marshall File::Stat, it's not allowed/supported.
>
> Irritating, but no problem, I'll build a Struct with all the values from
> the File::Stat that I want to save, and put that in the Hash instead,
> right?
>
> Well, that doesn't work so well, either. Now when I load that, I have
> no way to construct a File::Stat out of my own data (it lacks a "new"),
> and I lose all of File::Stats handy methods to see what kind of file it
> is, and its permissions, etc.
>
> Any suggestions? Can I define my own _load() and _dump() for File::Stat?
> Is that the right way? Am I not allowed to marshall File::Stat because
> its contents are system specific?
>
> Thanks for any pointers on how to deal with this,
> Sam
>
>Sam Roberts Guest



Reply With Quote

