Jump to content
  • Advertisement
Sign in to follow this  
KulSeran

Open a network file?

This topic is 4477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How would you implement the ability to open something like "\\196.168.0.2\myshare\myfile.dat"? Is there a portable way to do this? because fopen doesn't seem to work, nor does fstream. OR, do I have to resort to using some library to get that functionality portably.

Share this post


Link to post
Share on other sites
Advertisement
You'd first have to download the file, if you don't want to keep it permanently, save it to a temporary directory, and then open it. And no if it's something like HTTP your accessing (that is, accessing a file through HTTP) it wont edit the file and change it on the server, instead, you'd have to upload it somehow (most likely FTP), it's different for every protocol actually.

Share this post


Link to post
Share on other sites
Ah. Should have been more clear about it. A normal file dialog can access anything on the LAN. But how do you actually open the file once you get back the LAN adress to the file?
I'm sure SMP is technically a different protocal, but for most stuff in windows it seems transparent enough, and Im looking to add that functionality to my program.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by KulSeran
What would be the equivelent to CreateFile on Linux for this same purpose?


Well, if it's mounted as a Samba mount, any of the regular functions whould work. Actually, I don't see a reason why fopen or iostreams would fail on Windows...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!