gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deserializaton order


From: Frederico Muñoz
Subject: Deserializaton order
Date: Sat, 02 Apr 2005 23:51:50 +0200

Hello all,

Is there any way to specify some order when I deserialize some data?

My problem is this: I create a list of all the files inside a specified 
directory (all the fials, recursively) and I write the serialized NSDictionary 
to a file, where the key is the filename (Foo, Foo/Bar, Foo/Bar/baz, etc). I 
have in that file not only the file name but, as values, all the attributes of 
the original file. I then need to use this file as a "manifest" of files to 
copy inside an archive. The idea is that the files inside that file will get 
copied to a new destination, and only those, so even if an archive has other 
files they aren't copied.

The problem I'm having is that when I deserialize the data into a NSDictionary 
to perform the copy operations that filenames appear in random order, which 
causes copyPath:toPath:withHandler to fail sometimes. The problem is that if 
/Foo/bar/baz is copied first (apparently this method creates all the dirsr in 
the path if they don't exist, although I'm having problems with the return code 
when this happens) then when /Foo/bar, a directory, is passed to the method it 
will fail, since the destination mustn't exist.

I'm unsure how to implement this any other way, so any advices are greatly 
welcome.

Best regards,

fsmunoz
-- 
Frederico Muñoz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]