Professional Web Applications Themes

OSX: translate path with slashes to path with colons and volume name - Mac Applications & Software

Hi all, I need to convert a UNIX-path to a Mac OS X path. For example: /Applications/Chess.app matches Macintosh HD:Applications:Chess.app and, if i'd added a Volume called 'project' to the system: /Volumes/project/file.txt matches PROJECT:file.txt How can I translate a UNIX-path to a Mac OS 9 style path? This is possible using Applescript (see [url]http://macscripter.net/faq/general_osx.php[/url]), but I'd like to do it on the commandline, or in Java. I've searched google for about a day now, but it looks like I'm the first to ask this question... Thanks for your help, Arjan...

  1. #1

    Default OSX: translate path with slashes to path with colons and volume name

    Hi all,

    I need to convert a UNIX-path to a Mac OS X path.
    For example:
    /Applications/Chess.app
    matches
    Macintosh HD:Applications:Chess.app

    and, if i'd added a Volume called 'project' to the system:

    /Volumes/project/file.txt
    matches
    PROJECT:file.txt

    How can I translate a UNIX-path to a Mac OS 9 style path?
    This is possible using Applescript
    (see [url]http://macscripter.net/faq/general_osx.php[/url]), but I'd like
    to do it on the commandline, or in Java.

    I've searched google for about a day now, but it looks like
    I'm the first to ask this question...

    Thanks for your help,

    Arjan
    void Guest

  2. #2

    Default Re: OSX: translate path with slashes to path with colons and volume name

    Arjan Haverkamp <arjanwebpower.nl> wrote (Tue, 24 Jun 2003 15:12:54 +0200):
    > Well, that's not what I mean.
    > I have a Flash(SWF)-application that can only read files, when it is fed
    > with old, MAC OS9-style paths like "Macintosh HD:Applications:....".
    > Flash cannot read files on the Mac using the new Unix-style paths
    > (/Applications/...).
    > What I need is a way to translate the Unix-like paths to the old, OS9
    > style paths.
    > If Applescript can do it ([url]http://macscripter.net/faq/general_osx.php[/url]),
    > OSX should be able to do it on the commandline as well, right?
    > All I need is a way to convert a Unix-style path to its corresponding
    > OS9-style path (including the volume name!).
    Are you sure that that would work? I got the impression (based on
    "Mac OSX in a Nutshell") that old style colon paths work on only
    on HFS+ filesystems, while new style slash paths work on UFS
    filesystems, plus a few systems programs will accept slash paths
    even on HFS+ filesystems. So, if the underlying filesystem is a
    UFS volume, but the program rejects anything but HFS+ style paths,
    then you are in trouble.

    The "solution" may include involve the program and/or maintaining a
    HFS+ partition or drive on your computer.

    If there are only a few files involved, perhaps you could make a
    work directory with symbolic links to wherever the files you need
    are; then you would not need to specify the volume or directory in
    the path???

    Greg Shenaut
    gkshenaut@ucdavis.edu Guest

Similar Threads

  1. clipping path shows ouside path in quark
    By parker@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 9
    Last Post: August 21st, 07:48 PM
  2. Replies: 0
    Last Post: September 9th, 03:24 PM
  3. Replies: 1
    Last Post: September 9th, 03:20 PM
  4. #25444 [NEW]: php4isapi.dll path to win.ini doesn't load from current path.
    By ict at primus dot ca in forum PHP Development
    Replies: 0
    Last Post: September 9th, 03:35 AM
  5. load path as a selection button on the path palette
    By bill change in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 2
    Last Post: August 11th, 02:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139