Professional Web Applications Themes

converting url's from file:// to smb:// - Mac Programming

Hello, any of you guys have an idea on how to convert urls from file:// to smb:// paths, or even better, to UNC paths. I have to send UNC paths to a windows server application from a Mac client application. Any help/ideas appreciated, Kristof...

  1. #1

    Default converting url's from file:// to smb://

    Hello,

    any of you guys have an idea on how to convert urls from file:// to
    smb:// paths, or even better, to UNC paths. I have to send UNC paths
    to a windows server application from a Mac client application.


    Any help/ideas appreciated,
    Kristof
    justkristof Guest

  2. #2

    Default Re: converting url's from file:// to smb://

    In article <google.com>,
    be (justkristof) wrote:
     

    I wonder if the APIs in CFURL.h that take a CFURLPathStyle argument will
    do the trick. Stuff your file:// URL into a CFURL, then pass it to
    CFURLCopyFileSystemPath with kCFURLWindowsPathStyle and see if that
    works.

    Hope this helps,
    Eric

    --
    Eric Albert stanford.edu
    http://rescomp.stanford.edu/~ejalbert/
    Eric Guest

  3. #3

    Default Re: converting url's from file:// to smb://

    > I wonder if the APIs in CFURL.h that take a CFURLPathStyle argument will 

    Well, it was worth trying it, but inputting a string of the type

    "file:///Users/kristof/Public/somefile.txt"

    gives back something like:

    "Users\\kristof\\Public\\somefile.txt"

    which is not really what I wanted..., so I guess not :-( Code was
    simply:

    CFURLRef theUrlRef =
    ::CFURLCreateWithString(kCFAllocatorDefault,CFSTR( "file:///Users/kristof/Public/somefile.txt"),NULL);
    CFStringRef theCurrentRef =
    ::CFURLCopyFileSystemPath(theUrlRef,kCFURLWindowsP athStyle);

    Thanks for trying though.

    kristof
    justkristof Guest

Similar Threads

  1. Converting Illustrator File into PDF/X-1A File?
    By tuanh@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 1
    Last Post: August 7th, 12:50 AM
  2. Converting to XML file
    By namala in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: July 1st, 04:48 PM
  3. converting .pub file to web page
    By Bob in forum Web Design
    Replies: 1
    Last Post: May 21st, 08:03 PM
  4. Converting PHP file
    By Mike Blezien in forum PERL Beginners
    Replies: 7
    Last Post: September 16th, 07:35 PM
  5. Converting .swf into .fla file
    By Nessa webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: August 8th, 08:51 PM

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