Ignore:
Timestamp:
Sep 21, 1999, 1:01:43 PM (26 years ago)
Author:
phaller
Message:

Add: GetFileAttributeExA/W implemented. Time conversion is ugly still

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/Fileio.cpp

    r671 r998  
    1 /* $Id: Fileio.cpp,v 1.8 1999-08-24 23:46:36 phaller Exp $ */
     1/* $Id: Fileio.cpp,v 1.9 1999-09-21 11:00:23 phaller Exp $ */
    22
    33/*
     
    2020#include "handlemanager.h"
    2121#include "devio.h"
     22#include "oslibdos.h"
    2223
    2324//******************************************************************************
     
    786787
    787788DWORD WIN32API GetCompressedFileSizeW(LPCWSTR  lpFileName,
    788                                          LPDWORD  lpFileSizeHigh)
     789                                      LPDWORD  lpFileSizeHigh)
    789790{
    790791  LPCTSTR lpAsciiFileName;                             /* converted filename */
     
    804805  return (rc);                                              /* return result */
    805806}
     807
     808
     809/*****************************************************************************
     810 * Name      : BOOL GetFileAttributesExA
     811 * Purpose   :
     812 * Parameters:
     813 * Variables :
     814 * Result    :
     815 * Remark    : KERNEL32.874
     816 * Status    : UNTESTED
     817 *
     818 * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
     819 *****************************************************************************/
     820
     821BOOL WIN32API GetFileAttributesExA(LPCSTR                 lpFileName,
     822                                   GET_FILEEX_INFO_LEVELS fInfoLevelId,
     823                                   LPVOID                 lpFileInformation)
     824{
     825  BOOL rc;
     826
     827  dprintf(("KERNEL32: GetFileAttributesExA(%s,%08xh,%08xh) mostly implemented.\n",
     828           lpFileName,
     829           fInfoLevelId,
     830           lpFileInformation));
     831
     832  if (lpFileName == NULL) return FALSE;
     833  if (lpFileInformation == NULL) return FALSE;
     834
     835  if (fInfoLevelId == GetFileExInfoStandard)
     836  {
     837    LPWIN32_FILE_ATTRIBUTE_DATA lpFad = (LPWIN32_FILE_ATTRIBUTE_DATA) lpFileInformation;
     838
     839    rc = OSLibDosGetFileAttributesEx((LPSTR)lpFileName,
     840                                     fInfoLevelId,
     841                                     lpFileInformation);
     842    return (rc);
     843  }
     844  else
     845  {
     846    dprintf(("KERNEL32: GetFileAttributesExA - invalid info level %d!\n",
     847             fInfoLevelId));
     848    return FALSE;
     849  }
     850}
     851
     852
     853/*****************************************************************************
     854 * Name      : BOOL GetFileAttributesExW
     855 * Purpose   :
     856 * Parameters:
     857 * Variables :
     858 * Result    :
     859 * Remark    : KERNEL32.875
     860 * Status    : UNTESTED
     861 *
     862 * Author    : Patrick Haller [Mon, 1998/06/15 08:00]
     863 *****************************************************************************/
     864
     865BOOL WINAPI GetFileAttributesExW(LPCWSTR                lpFileName,
     866                                 GET_FILEEX_INFO_LEVELS fInfoLevelId,
     867                                 LPVOID                 lpFileInformation)
     868{
     869  LPSTR nameA = HEAP_strdupWtoA( GetProcessHeap(), 0, lpFileName );
     870  BOOL res = GetFileAttributesExA( nameA, fInfoLevelId, lpFileInformation);
     871  HeapFree( GetProcessHeap(), 0, nameA );
     872  return res;
     873}
     874
Note: See TracChangeset for help on using the changeset viewer.