Re: Hashing a folder
Re: Hashing a folder
- Subject: Re: Hashing a folder
- From: m <email@hidden>
- Date: Mon, 17 Oct 2005 00:08:55 -0700
If you only need to see if the two folders are "identical", here's an
idea...
1) Load the directories in question into directory NSFileWrappers.
NSFileWrapper* fw1 = [[NSFileWrapper alloc] initWithPath:directory1];
NSFileWrapper* fw2 = [[NSFileWrapper alloc] initWithPath:directory2];
2) Compare the wrapper's serialized representations
if (![[fw1 serializedRepresentation] isEqualToData:[fw2
serializedRepresentation]])
{
// the directories are different somehow.
}
Off the top of my head, typed in in Mail, not tested, may not scale
well if folders are really huge, blah blah blah.
_murat
On Oct 16, 2005, at 11:21 PM, Yann Bizeul wrote:
I have two folders and I need to determine if they are identical.
I've searched Cocoabuilder and included libcrypto and started
toying with the EVP stuff, but I'm not figuring it out. I can only
see ways to manipulate strings. What is the best way to go about
hashing and comparing two folders?
I do not see any other solution than recursively get every files of
every folder and make some kind of checksum with data, dates, names
etc.
Yann Bizeul • yann at tynsoe.org
Cocoa Developer
Tynsoe Projects
BuddyPop • GeekTool • SSH Tunnel Manager • ...
http://projects.tynsoe.org/
Le 16 oct. 05 à 21:17, Thom McGrath a écrit :
I have two folders and I need to determine if they are identical.
I've searched Cocoabuilder and included libcrypto and started
toying with the EVP stuff, but I'm not figuring it out. I can only
see ways to manipulate strings. What is the best way to go about
hashing and comparing two folders?
--
Thom McGrath, <http://www.thezaz.com/>
"You don't need eyes to see, you need vision" - Maxi Jazz in
"Reverence" by Faithless
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden