Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using a web browser, NFS, etc.



Bill,
Don't know if anyone else has done so, but I manually mounted one of my NFS shares (from an SGI, but that should make no difference) and then used the URL

file:///usri/people/frey/test.html

And got two different alternating errors with Explorer. So I tried this test code (set up in a CoreFoundation tool project in ProjectBuilder). The URL I create is relative to an NFS share mounted statically at /usri:
---snip---
#include <CoreFoundation/CoreFoundation.h>

int main (int argc, const char * argv[]) {
// insert code here...

CFURLRef theURL;
CFDataRef theData = NULL;
SInt32 result;

#ifdef 1
theURL = CFURLCreateWithFileSystemPath(NULL,CFSTR("/usri/frey/Graphite.html"),kCFURLPOSIXPathStyle,
FALSE);
#elif 0
theURL = CFURLCreateWithFileSystemPath(NULL,CFSTR("usri:frey:Graphite.html"),kCFURLHFSPathStyle,
FALSE);
#else
theURL = CFURLCreateWithString(NULL,CFSTR("file:///usri/frey/Graphite.html"),NULL);
#endif

if (theURL) {
CFShow(theURL);
if (CFURLCreateDataAndPropertiesFromResource(NULL,theURL,&theData,NULL,NULL,&result)
)
CFShow(theData);
else
CFShow(CFSTR("Couldn't read data from URL!"));
} else
CFShow(CFSTR("Couldn't make URL!"));
return 0;
}
---snip---
ALL of the URL creation statements above succeed in creating a URL and subsequently read and display the data from the file in question. CoreFoundation URL support is in Carbon, so it's not that the browser makers don't want to hobble their browser to one Mac OS flavor. It would appear that they're either not using it right or not using it at all.

-Jeff
------
Jeffrey Frey, Doctoral Candidate and Research Assistant
Doren Research Group
Dept. of Chemistry, University of Delaware
http://deaddog.duch.udel.edu/~frey/
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.