SalFileHandle
PPJ.Runtime.SalFileHandle
Last updated
PPJ.Runtime.SalFileHandle
Last updated
Namespace: PPJ.Runtime
Assembly: PPJ.Web.49 (4.9.0.0)
IntPtr: Returns the handle for this SalFileHandle object
Boolean: Returns true if the file was opened in binary mode.
Boolean: Checks if this SalFileHandle object contains a null value.
Int32: Returns the last error code.
Stream: Returns the wrapped FileStream object.
Closes a file.
Returns: Boolean. bOk
Copies the contents of one file (source) to another file (destination).
Parameter | Type | Description |
---|---|---|
sSourcePath | The full path name of the source file. | |
sDestPath | The full path name of the destination file. | |
bOverWrite | Specifies whether (TRUE) or not (FALSE) to overwrite the destination file. If the destination file already exists and bOverWrite is FALSE, then SalFileCopy fails, and returns FILE_CopyExist. If the destination file already exists and bOverWrite is TRUE, then SalFileCopy succeeds and the destination file is overwritten. |
Returns: SalNumber. nStatus
Creates a directory.
Parameter | Type | Description |
---|---|---|
sDir | The full path name of the new directory. |
Returns: SalBoolean. bOk
Returns the SalFileHandle object from the handle
Parameter | Type | Description |
---|---|---|
handle |
Returns: SalFileHandle.
Returns the next character in an open file.
Returns: SalNumber. nChar
Parameter | Type | Description |
---|---|---|
nChar |
Returns: Boolean.
Parameter | Type | Description |
---|---|---|
sPath |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
sFilename | ||
dtDateTime |
Returns: SalBoolean.
Gets the letter of the default (current) disk drive.
Returns: SalString. sDriveLetter
Parameter | Type | Description |
---|---|---|
info | ||
context |
Returns the next line from an open file. Lines are terminated by \r\n or \r or
Parameter | Type | Description |
---|---|---|
maxLength |
Returns: SalString.
Parameter | Type | Description |
---|---|---|
line | ||
maxLength |
Returns: Boolean.
Opens, re-opens, creates, or deletes a file.
Parameter | Type | Description |
---|---|---|
fileName | The name of the file to open, create, delete, or test. | |
flags | A constant that specifies the style in which to open the file. nStyle can be one or more styles combined using the bitwise OR (|) operator. |
Returns: Boolean. bOk
Opens, re-opens, creates, or deletes a file.
Parameter | Type | Description |
---|---|---|
fileName | The name of the file to open, create, delete, or test. | |
flags | A constant that specifies the style in which to open the file. nStyle can be one or more styles combined using the bitwise OR (|) operator. | |
encoding | Encoder used to read/write characters. |
Returns: Boolean. bOk
Writes a character to an open file.
Parameter | Type | Description |
---|---|---|
c | The ANSI numeric value of the character to write to hFile. |
Returns: Boolean. bOk
Writes a string to an open file.
Parameter | Type | Description |
---|---|---|
text | The string to write. |
Returns: Boolean. bOk
Reads a buffer of characters from an open file to a string .
Parameter | Type | Description |
---|---|---|
maxLength |
Returns: SalString.
Parameter | Type | Description |
---|---|---|
buffer | ||
maxLength |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
buffer | ||
maxLength |
Returns: SalNumber.
Deletes a directory.
Parameter | Type | Description |
---|---|---|
sDir | The full path name of the directory to delete. |
Returns: SalBoolean. bOk
Positions the file pointer in an open file. The next file operation (such as a read or write) takes place at this new location.
Parameter | Type | Description |
---|---|---|
bytes | The specific position of the file pointer; the number of bytes from nPosition where the next file operation will take place. | |
position | The general position of the file pointer; one of the following values: FILE_SeekBegin FILE_SeekCurrent FILE_SeekEnd |
Returns: Boolean. bOk
Changes the current working directory. If the specified path does not contain a drive letter, the default drive's current directory is changed. Otherwise, the specified drive's current directory is changed and the specified drive is made the current drive.
Parameter | Type | Description |
---|---|---|
sPath | The path name of the new current working directory. |
Returns: SalBoolean. bOk
Sets the modification date and time of the specified file.
Parameter | Type | Description |
---|---|---|
sFilename | The name of the file whose modification date you want to set. | |
dtDateTime | The modification date and time. |
Returns: SalBoolean. bOk
Sets the current disk drive to the specified drive letter.
Parameter | Type | Description |
---|---|---|
sDriveLetter | The new disk drive letter. The length of this parameter's value is one character. |
Returns: SalBoolean. bOk
Returns the current position in an open file.
Returns: SalNumber. nPos
Uses the specified stream .
Parameter | Type | Description |
---|---|---|
stream | The stream to read or write. | |
flags | A constant that specifies the style in which to used the stream. nStyle can be one or more styles combined using the bitwise OR (|) operator. |
Returns: Boolean. bOk
Uses the specified stream .
Parameter | Type | Description |
---|---|---|
stream | The stream to read or write. | |
flags | A constant that specifies the style in which to used the stream. nStyle can be one or more styles combined using the bitwise OR (|) operator. | |
encoding | Encoder used to read/write characters. |
Returns: Boolean. bOk
Writes a string to an open file.
Parameter | Type | Description |
---|---|---|
str | The string to write to hFile. | |
length | The number of bytes to write. |
Returns: SalNumber.
Writes a binary buffer to an open file.
Parameter | Type | Description |
---|---|---|
binary | The string to write to hFile. | |
length | The number of bytes to write. |
Returns: SalNumber.
Name | Description |
---|---|
Converts a SalFileHandle to a number. | |
Writes a character to an open file. | |
Writes a string to an open file and appends a carriage return/line feed character to the string. | |
Positions the file pointer in an open file. | |
Returns the current position in an open file. | |
Writes a string to an open file. | |
Returns the SalFileHandle object from the handle | |