home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY5 / DISK.ZIP / DISK.DOC < prev    next >
Text File  |  1990-05-15  |  4KB  |  89 lines

  1.                 CONTENTS OF DISK.OBJ
  2. ------------------------------------------------------------------------------
  3. function backup%(string,string)        ' Copy files
  4. function curdrv%()            ' Get current drive
  5. function exst%(string)            ' check for file attributes
  6. function find1$(string,integer)        ' Find First
  7. function find2$()            ' Find Next
  8. function freespace&(string)        ' return free space on a drive
  9. function iam$()                ' return the current program pathname
  10. function isdir$()            ' get the current directory
  11. function size&(string)            ' return the size of a file (bytes)
  12. sub chdrv(string)            ' Change Drive
  13. sub flush()                ' Flush File Buffers
  14. ------------------------------------------------------------------------------
  15. Function Name:        Backup%
  16. Calling Parameters:    Original ASCIIZ Filename, Backup ASCIIZ Filename
  17. Return Value:        Returns:
  18.                 -1 - No Errors
  19.                  1 - Can't open original file
  20.                  2 - Can't open backup file
  21.                  3 - Disk read error
  22.                  4 - Disk write error
  23.                  5 - Disk full
  24.                  6 - Can't close original file
  25.                  7 - Can't close backup file
  26. Notes:            You can use the standard DOS handles,
  27.             'PRN','CON','AUX' in place of either file name.
  28.             Drives/Paths can also be specified in the file
  29.             names.
  30. Cautions:        I recieve spurious 'Disk Full' errors when copying
  31.             a file to the 'PRN' device.  Since the file does
  32.             print correctly, I can only assume that this may
  33.             be a timeout error that can safely be ignored.
  34. ------------------------------------------------------------------------------
  35. Function Name:        Curdrv%
  36. Calling Parameters:    None
  37. Return Value:        Returns the ascii value of the current drive
  38. ------------------------------------------------------------------------------
  39. Function Name:        Exst%
  40. Calling Parameters:    String containing a single filename, terminated
  41.             with a chr$(0)
  42. Return Value:        Returns the file's attributes if found, -1 if not
  43.             found
  44. ------------------------------------------------------------------------------
  45. Function Name:        Find1$
  46. Calling Parameters:    1.  String containing a file mask {i.e. *.bas}
  47.             2.  File attribute mask
  48. Return Value:        Returns the first file found or a null string if
  49.             there are no matches
  50. Cautions:        The contents of the default DTA are destroyed
  51. ------------------------------------------------------------------------------
  52. Function Name:        Find2$
  53. Calling Parameters:    None
  54. Return Value:        Returns the next file found after calling Find1$ or
  55.             a null string if there are no more files that match
  56. Cautions:        You MUST use Find1$ BEFORE using this function
  57.             The contents of the default DTA are destroyed
  58. ------------------------------------------------------------------------------
  59. Function Name:        FreeSpace&
  60. Calling Parameters:    String containing the drive id {'A'..'Z'} or a
  61.             chr$(0) {current drive}
  62. Return Value:        Free space {in bytes} remaining on drive
  63. ------------------------------------------------------------------------------
  64. Function Name:        Iam$
  65. Calling Parameters:    None
  66. Return Value:        Returns the drive, pathname and filename of the
  67.             currently executing program.
  68. ------------------------------------------------------------------------------
  69. Function Name:        IsDir$
  70. Calling Parameters:    None
  71. Return Value:        Returns the name of the current directory or
  72.             sub directory including the 'dr:\'
  73. ------------------------------------------------------------------------------
  74. Function Name:      Size&
  75. Calling Parameters:     String containing a single filename
  76. Return Value:        Size of filename if found, -1 if not found
  77. Cautions:        File must be in the current directory.  Path names
  78.             are not valid as part of the filename, but drive
  79.             id's are.
  80. ------------------------------------------------------------------------------
  81. Subroutine Name:    Chdrv
  82. Calling Parameters:     Drive id to log {'A'..'Z'}
  83. Action:            Changes the active drive
  84. ------------------------------------------------------------------------------
  85. Subroutine Name:        Flush
  86. Calling Parameters:    None
  87. Action:            Flushes all open file buffers.  Does not close files
  88. ------------------------------------------------------------------------------
  89.