 locals make math math.bitwise namespaces sequences
 specialized-arrays system threads tr windows windows.errors
 windows.handles windows.kernel32 windows.shell32 windows.time
-windows.types ;
+windows.types fry ;
 SPECIALIZED-ARRAY: ushort
 IN: io.files.windows
 


ERROR: invalid-file-size n ;

: handle>file-size ( handle -- n )
    0 ulonglong <ref> [ GetFileSizeEx win32-error=0/f ] keep ulonglong deref ;

ERROR: seek-before-start n ;


    } case ;

M: windows can-seek-handle? ( handle -- ? )
    handle>> handle>file-size >boolean ;

M: windows handle-length ( handle -- n/f )
    handle>> handle>file-size
    dup { 0 f } member? [ drop f ] when ;

: file-error? ( n -- eof? )
    zero? [
