Skip to main content
GameDev.net gamedev.net
🔒 Locked

Asynchronous File IO

Started by DrEvil Jul 16, 2004 at 7:40 AM 6 replies 850+ views
Original Post
DrEvil
DrEvil
I'm wondering if someone can give me some information about asynchronous file loading in C++. I did a search from within VS .NET 7.1 and it came up with the FileStream class which is usable for C++ but it appears to be part of the .NET class library and is therefor not cross platform(?) If I'm wrong about this or anyone knows of a cross platform asyncronous file solution please let me know, I'd like to avoid using threads directly myself. The FileStream class looks just about right for my needs but I'd prefer one that isn't locked into windows. Thanks
CoffeeMug
CoffeeMug
There is native Win32 API for asyncronious file IO. It's still not going to port to *nix platforms. If you want your code to port, you'll have to write two implementations of that particular component: one for windows, one for unix.
Matei
Matei
FileStream is cross-platform, I don't see why it wouldn't be. The .NET class library is the "core" library for .NET, so it's the most likely part to be cross-platform.
DrEvil
DrEvil
I'd prefer someone with experience to submit a simple yes or no. I unfortunately don't have time to be installing and testing such things right now, I'm targeting windows now but I want to make it so that it's easier to port to linux later by reducing known platform dependancies.
Sphet
Sphet
I always end up writing different Async IO code for every platform, they are all different, but then I've only ever done it for consoles and win32. I use the CreateFile() function under Windows, with the correct file flags.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.