core/win32/os.c
/* Returns true and sets 'size' of file on success; returns false on failure.
 * Note: This size is different from the allocation size of the file, which can
 * be larger or smaller (if file compression is turned on - case 8272).
 */
Returns true and sets 'size' of file on success; returns false on failure.
Note: This size is different from the allocation size of the file, which can
be larger or smaller (if file compression is turned on - case 8272).
Returns true and sets ' size ' of file on success ; returns false on failure . Note : This size is different from the allocation size of the file which can be larger or smaller ( if file compression is turned on - case 8272 ) .
bool
os_get_file_size(const char *file, uint64 *size)
{
    wchar_t filename[MAXIMUM_PATH + 1];
    FILE_NETWORK_OPEN_INFORMATION file_info;
    ASSERT(file != NULL && size != NULL); 
    if (file == NULL || size == NULL)
        return false;
     _snwprintf(filename, BUFFER_SIZE_ELEMENTS(filename), L"\\??\\%hs", file);
     NULL_TERMINATE_BUFFER(filename);
     if (query_full_attributes_file(filename, &file_info)) {
        ASSERT(sizeof(*size) == sizeof(file_info.EndOfFile.QuadPart));
        *size = file_info.EndOfFile.QuadPart;
        return true;
     }
     return false;
}
bool os_get_file_size ( const char * file , uint64 * size ) { wchar_t filename [ MAXIMUM_PATH + 1 ] ; FILE_NETWORK_OPEN_INFORMATION file_info ; ASSERT ( file != NULL && size != NULL ) ; if ( file == NULL || size == NULL ) return false ; _snwprintf ( filename , BUFFER_SIZE_ELEMENTS ( filename ) , L" \\ \\ " , file ) ; NULL_TERMINATE_BUFFER ( filename ) ; if ( query_full_attributes_file ( filename , & file_info ) ) { ASSERT ( sizeof ( * size ) == sizeof ( file_info . EndOfFile . QuadPart ) ) ; * size = file_info . EndOfFile . QuadPart ; return true ; } return false ; }
Returns true and sets 'size' of file on success; returns false on failure.
Returns true and sets ' size ' of file on success ; returns false on failure .
/* See FIXME in os_internal_create_file() about prepending \??\ to the path
     * directly. 
     */ /* FIXME: case 9182 this won't work for remote files */