On Jan 18, 2007, at 6:37 AM, Emile SCHWARZ wrote:

Hi all,

REALbasic 2007r1
Mac OS X 10.4.8

Dim f As FolderItem

If f.Directory Then
  //
  ListBox1.AddRow f.DisplayName
// Here you get all folders (standard directories and also .app, .pkg, etc.)


How do I filter these Mac OS X 'faked' folders ?


Workaround ?
Yes, I see one: test the extension and exclude the folder who have one (exclude .app, .pkg, .<whatever>).

How many lines to do that ?

Real question: how do you deal with that ?

Hi Emile,

Here's my two routines. Call the methods with the path as a ShellPath (i.e.: /Applications/iCal.app )

Sub IsApp(Path as String)
  // Expects the ShellPath...
  if Right(Path, 4) = ".app" Then
    // Update Path to drop the .app
    Path = Left(Path, Path.Len - 4)
    return true
  else
    return false
  End If
End Sub

Sub IsPkg(Path as String)
  // Expects the ShellPath...
  if Right(Path, 4) = ".pkg" Then
    // Update Path to drop the .pkg
    Path = Left(Path, Path.Len - 4)
    return true
  else
    return false
  End If
End Sub

HTH,

Tim
--
Tim Jones
[EMAIL PROTECTED]

_______________________________________________
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>

Reply via email to