• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hashing a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Hashing a folder
      • From: j o a r <email@hidden>
References: 
 >Hashing a folder (From: Thom McGrath <email@hidden>)
 >Re: Hashing a folder (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: Hashing a folder
  • Next by Date: how to get application starts automatically
  • Previous by thread: Re: Hashing a folder
  • Next by thread: Re: Hashing a folder
  • Index(es):
    • Date
    • Thread