home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool.zip / OOL / source / xfileinf.cpp < prev    next >
C/C++ Source or Header  |  1997-02-27  |  2KB  |  79 lines

  1. #include "xfileinf.h"
  2. #include "XDate.h"
  3. #include "XTime.h"
  4.  
  5.  
  6. /*@ XFileInfo::GetCreationDate(XDate * date)
  7. @group get information
  8. @remarks Query the date when the file was created.
  9. @parameters  XDate * buffer    buffer to hold the data
  10. */
  11. void XFileInfo::GetCreationDate(XDate * date)
  12. {
  13.     date->d.days = buffer.fdateCreation.day;
  14.     date->d.months = buffer.fdateCreation.month;
  15.     date->d.years = buffer.fdateCreation.year + 1980;
  16. }
  17.  
  18.  
  19. /*@ XFileInfo::GetCreationTime(XTime * time)
  20. @group get information
  21. @remarks Query the time when the file was created.
  22. @parameters  XTime * buffer    buffer to hold the data
  23. */
  24. void XFileInfo::GetCreationTime(XTime * time)
  25. {
  26.     time->t.seconds = buffer.ftimeCreation.twosecs * 2;
  27.     time->t.minutes = buffer.ftimeCreation.minutes;
  28.     time->t.hours = buffer.ftimeCreation.hours;
  29. }
  30.  
  31.  
  32. /*@ XFileInfo::GetLastWriteDate(XDate * date)
  33. @group get information
  34. @remarks Query the date of last write-access
  35. @parameters  XDate * buffer    buffer to hold the data
  36. */
  37. void XFileInfo::GetLastWriteDate(XDate * date)
  38. {
  39.     date->d.days = buffer.fdateLastWrite.day;
  40.     date->d.months = buffer.fdateLastWrite.month;
  41.     date->d.years = buffer.fdateLastWrite.year + 1980;
  42. }
  43.  
  44.  
  45. /*@ XFileInfo::GetLastWriteTime(XTime * time)
  46. @group get information
  47. @remarks Query the time of last write-access
  48. @parameters  XTime * buffer    buffer to hold the data
  49. */
  50. void XFileInfo::GetLastWriteTime(XTime * time)
  51. {
  52.     time->t.seconds = buffer.ftimeLastWrite.twosecs * 2;
  53.     time->t.minutes = buffer.ftimeLastWrite.minutes;
  54.     time->t.hours = buffer.ftimeLastWrite.hours;
  55. }
  56.  
  57.  
  58. /*@ XFileInfo::GetFileSize(void)
  59. @group get information
  60. @remarks Query the size of the file.
  61. @returns ULONG size
  62. */
  63. ULONG XFileInfo::GetFileSize(void) const
  64. {
  65.     return buffer.cbFile;
  66. }
  67.  
  68.  
  69. /*@ XFileInfo::GetFileAttributes(void)
  70. @group get information
  71. @remarks Query the files attributes
  72. @returns LONG attributes
  73. */
  74. LONG XFileInfo::GetFileAttributes(void) const
  75. {
  76.     return buffer.attrFile;
  77. }
  78.  
  79.