Xojo Conferences
XDCMay2019MiamiUSA

How to get the absolute Unix path? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Hiding rows in lists
Next thread: OpenBase Plugin 3.0a2 for REALbasic


Re: The basics of text parsing   -   Jan Erik Moström <
  How to get the absolute Unix path?   -   Erich Rast
   Re: How to get the absolute Unix path?   -   James Sentman
    Re: How to get the absolute Unix path?   -   Brady Duga
     Re: How to get the absolute Unix path?   -   John H. Guillory
      Re: How to get the absolute Unix path?   -   Brady Duga
       Need Grid Control   -   Matt
   httpsocket and linksys router   -   Gregory J. Smith

How to get the absolute Unix path?
Date: 31.07.02 15:02 (Wed, 31 Jul 2002 16:02:39 +0200)
From: Erich Rast
Hi,

For some shell commands I need the absolute Unix path of a
folderItem. It seems bad to rely on assumptions about the file system
structure on OS X, so what's the best way to get it?

Regards,

Erich

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: How to get the absolute Unix path?
Date: 31.07.02 15:13 (Wed, 31 Jul 2002 10:13:53 -0400)
From: James Sentman
>Hi,
>
>For some shell commands I need the absolute Unix path of a
>folderItem. It seems bad to rely on assumptions about the file
>system structure on OS X, so what's the best way to get it?

The best way to get it is via huskerchad's excellent OSX utility plugins:

http://homepage.mac.com/huskerchad/FileSharing.html

The MFile plugin offers the GetFolderFromUnixPath and
GetUnixPathFromFolderitem methods.

-James

Re: How to get the absolute Unix path?
Date: 31.07.02 16:41 (Wed, 31 Jul 2002 08:41:29 -0700)
From: Brady Duga

On Wednesday, July 31, 2002, at 07:13 AM, James Sentman wrote:
>>
>> For some shell commands I need the absolute Unix path of a folderItem.
>> It seems bad to rely on assumptions about the file system structure on
>> OS X, so what's the best way to get it?
>
> The best way to get it is via huskerchad's excellent OSX utility
> plugins:
>
> http://homepage.mac.com/huskerchad/FileSharing.html

And for those that prefer to avoid using plugins, look in the archives
for posts titled "Shell paths & Carbon paths" - there is a function in
one of the posts from me using declares instead.

--Brady
The La Jolla Underground

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: How to get the absolute Unix path?
Date: 31.07.02 22:31 (Wed, 31 Jul 2002 16:31:07 -0500)
From: John H. Guillory
On Wed, 31 Jul 2002 08:41:29 -0700, you wrote:

>And for those that prefer to avoid using plugins, look in the archives
>for posts titled "Shell paths & Carbon paths" - there is a function in
>one of the posts from me using declares instead.
Couldn't you just use something like
PreferencesFolder.Child("myfile.pref").AbsolutePath Then, strip off
the myfile.pref from the end to locate the preferences folder.... For
other folders, just use the appropriate class/variable....
John H. Guillory
Ps 150:1-6
Administrator of main-line.net and mlc-hosting.net
Internet Web Hosting and Computer Consulting Services.
<email address removed>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: How to get the absolute Unix path?
Date: 01.08.02 00:14 (Wed, 31 Jul 2002 16:14:47 -0700)
From: Brady Duga

On Wednesday, July 31, 2002, at 02:31 PM, John H. Guillory wrote:

> On Wed, 31 Jul 2002 08:41:29 -0700, you wrote:
>
>> And for those that prefer to avoid using plugins, look in the archives
>> for posts titled "Shell paths & Carbon paths" - there is a function in
>> one of the posts from me using declares instead.
> Couldn't you just use something like
> PreferencesFolder.Child("myfile.pref").AbsolutePath Then, strip off
> the myfile.pref from the end to locate the preferences folder.... For
> other folders, just use the appropriate class/variable....

No, this gives you a Mac style path, not a POSIX path. So, "Macintosh
HD:Users:duga" should be "/Users/duga". If it is some other volume,
"NetVol1:a folder:" becomes "/Volumes/NetVol1/a\ folder". And that
assumes the standard OS X mount points... You need to perform the
conversion to a POSIX path, make sure it is UTF-8 encoded (I think
f.AbsolutePath is UTF-8 in 4.5, but that is new), and back-quote any
"funky" characters.

--Brady
The La Jolla Underground

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>