home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
pb
/
library5
/
disk.doc
< prev
next >
Wrap
Text File
|
1990-05-14
|
4KB
|
89 lines
CONTENTS OF DISK.OBJ
------------------------------------------------------------------------------
function backup%(string,string) ' Copy files
function curdrv%() ' Get current drive
function exst%(string) ' check for file attributes
function find1$(string,integer) ' Find First
function find2$() ' Find Next
function freespace&(string) ' return free space on a drive
function iam$() ' return the current program pathname
function isdir$() ' get the current directory
function size&(string) ' return the size of a file (bytes)
sub chdrv(string) ' Change Drive
sub flush() ' Flush File Buffers
------------------------------------------------------------------------------
Function Name: Backup%
Calling Parameters: Original ASCIIZ Filename, Backup ASCIIZ Filename
Return Value: Returns:
-1 - No Errors
1 - Can't open original file
2 - Can't open backup file
3 - Disk read error
4 - Disk write error
5 - Disk full
6 - Can't close original file
7 - Can't close backup file
Notes: You can use the standard DOS handles,
'PRN','CON','AUX' in place of either file name.
Drives/Paths can also be specified in the file
names.
Cautions: I recieve spurious 'Disk Full' errors when copying
a file to the 'PRN' device. Since the file does
print correctly, I can only assume that this may
be a timeout error that can safely be ignored.
------------------------------------------------------------------------------
Function Name: Curdrv%
Calling Parameters: None
Return Value: Returns the ascii value of the current drive
------------------------------------------------------------------------------
Function Name: Exst%
Calling Parameters: String containing a single filename, terminated
with a chr$(0)
Return Value: Returns the file's attributes if found, -1 if not
found
------------------------------------------------------------------------------
Function Name: Find1$
Calling Parameters: 1. String containing a file mask {i.e. *.bas}
2. File attribute mask
Return Value: Returns the first file found or a null string if
there are no matches
Cautions: The contents of the default DTA are destroyed
------------------------------------------------------------------------------
Function Name: Find2$
Calling Parameters: None
Return Value: Returns the next file found after calling Find1$ or
a null string if there are no more files that match
Cautions: You MUST use Find1$ BEFORE using this function
The contents of the default DTA are destroyed
------------------------------------------------------------------------------
Function Name: FreeSpace&
Calling Parameters: String containing the drive id {'A'..'Z'} or a
chr$(0) {current drive}
Return Value: Free space {in bytes} remaining on drive
------------------------------------------------------------------------------
Function Name: Iam$
Calling Parameters: None
Return Value: Returns the drive, pathname and filename of the
currently executing program.
------------------------------------------------------------------------------
Function Name: IsDir$
Calling Parameters: None
Return Value: Returns the name of the current directory or
sub directory including the 'dr:\'
------------------------------------------------------------------------------
Function Name: Size&
Calling Parameters: String containing a single filename
Return Value: Size of filename if found, -1 if not found
Cautions: File must be in the current directory. Path names
are not valid as part of the filename, but drive
id's are.
------------------------------------------------------------------------------
Subroutine Name: Chdrv
Calling Parameters: Drive id to log {'A'..'Z'}
Action: Changes the active drive
------------------------------------------------------------------------------
Subroutine Name: Flush
Calling Parameters: None
Action: Flushes all open file buffers. Does not close files
------------------------------------------------------------------------------