my bad.. was formated fat32.. df reports ntfs correctly
got excited there for a moment...
my bad.. was formated fat32.. df reports ntfs correctly
got excited there for a moment...
my bad.. ntfs in linux isnt broken.. had a fat32 drive in.. sparse files fool fat32 but not ntfs..
in Windows the CreateFile method is actually creating a handler for direct disk IO.. that is what I really want to do in Linux..
sorry for the double post.. didnt see that it went to page 2
Last edited by jcas1411; 01-26-2009 at 02:27 PM. Reason: my bad
found my own answer.. maybe
Windows uses unbuffered disk IO whereas Linux uses unbuffered file IO
http://www.developer.com/net/cplus/a...0919_2119781_5
nice help how to do on either platform via C
Both Windows and Linux normally uses buffered I/O - although memory cards/USB sticks are "unbuffered" because people tend to pull them out at almost any time - and it helps if half the data wasn't left dangling in the computers memory [that applies for WinXP onwards, pre-XP the buffering was done for all devices whcih is why you HAVE to "eject" a drive in Win2K etc, but not in WinXP].
Both Linux and Windows also allow you to add flags when opening a file to say "do not buffer this" (that is the basic OS level file-functions, what the upper layer C or C++ library does with this capability is a different story).
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
>>>>>.... to create a file with an exact size x
Did anybody consider to try ftruncate(), ftruncate64()?
Last edited by ma5645; 02-07-2009 at 12:45 PM.