For this task you cannot (should not) use RB; it'd be a huge waste of
resources and it would take very long on large volumes.
Use a system call for this, or if you must, if you're on Linux or OSX use
the shell to execute something like: "find /somedir -name filetofind.ext
-print"
Ronald Vogelaar
--
http://www.rovosoft.com
-----Original Message-----
From: realbasic-nug-bounces at lists dot realsoftware dot com
[mailto:realbasic-nug-bounces at lists dot realsoftware dot com] On Behalf Of
joe at strout dot net
Sent: donderdag 29 juni 2006 19:43
To: REALbasic NUG
Subject: Re: FolderItem question
On Jun 29, 2006, at 17:32 UTC, Craig Hoyt wrote:
> Is it possible to get the folderitem of a file when only the volume
> name and file name are known? This, assuming there is only one file
> with that name on the volume, of course.
Yes, you'll just have to search the entire volume to find it. That means,
for example, writing a Find method that takes a FolderItem (which should be
a directory) and a file name to search for. It examines all the Items
within that folder, and if it finds one with a matching name, returns it;
and for any item that's a directory, it calls Find on it.
Best,
- Joe
--
Joe Strout -- joe at strout dot net
Verified Express, LLC "Making the Internet a Better Place"
http://www.verex.com/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|