SalFileHandle
PPJ.Runtime.SalFileHandle
Namespace: PPJ.Runtime
Assembly: PPJ.Web.49 (4.9.0.0)
public struct SalFileHandle : ValueType, ISerializable, IXmlSerializable
Properties
Handle

IntPtr: Returns the handle for this SalFileHandle object
IsBinary

Boolean: Returns true if the file was opened in binary mode.
IsNull

Boolean: Checks if this SalFileHandle object contains a null value.
LastError

Int32: Returns the last error code.
Stream

Stream: Returns the wrapped FileStream object.
Methods
Close()

Closes a file.
Returns: Boolean. bOk
Copy(sSourcePath, sDestPath, bOverWrite)

Copies the contents of one file (source) to another file (destination).
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
CreateDirectory(sDir)

Creates a directory.
Returns: SalBoolean. bOk
FromHandle(handle)

Returns the SalFileHandle object from the handle
Returns: SalFileHandle.
GetChar()

Returns the next character in an open file.
Returns: SalNumber. nChar
GetChar(nChar)

Returns: Boolean.
GetCurrentDirectory(sPath)

Returns: SalBoolean.
GetDateTime(sFilename, dtDateTime)

Returns: SalBoolean.
GetDrive()

Gets the letter of the default (current) disk drive.
Returns: SalString. sDriveLetter
GetObjectData(info, context)

GetString(maxLength)

Returns the next line from an open file. Lines are terminated by \r\n or \r or
Returns: SalString.
GetString(line, maxLength)

Returns: Boolean.
Open(fileName, flags)

Opens, re-opens, creates, or deletes a file.
Returns: Boolean. bOk
Open(fileName, flags, encoding)

Opens, re-opens, creates, or deletes a file.
Returns: Boolean. bOk
PutChar(c)

Writes a character to an open file.
Returns: Boolean. bOk
PutString(text)

Writes a string to an open file.
Returns: Boolean. bOk
Read(maxLength)

Reads a buffer of characters from an open file to a string .
Returns: SalString.
Read(buffer, maxLength)

Returns: SalNumber.
Read(buffer, maxLength)

Returns: SalNumber.
RemoveDirectory(sDir)

Deletes a directory.
Returns: SalBoolean. bOk
Seek(bytes, position)

Positions the file pointer in an open file. The next file operation (such as a read or write) takes place at this new location.
Returns: Boolean. bOk
SetCurrentDirectory(sPath)

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.
Returns: SalBoolean. bOk
SetDateTime(sFilename, dtDateTime)

Sets the modification date and time of the specified file.
Returns: SalBoolean. bOk
SetDrive(sDriveLetter)

Sets the current disk drive to the specified drive letter.
sDriveLetter
The new disk drive letter. The length of this parameter's value is one character.
Returns: SalBoolean. bOk
Tell()

Returns the current position in an open file.
Returns: SalNumber. nPos
Use(stream, flags)

Uses the specified stream .
Returns: Boolean. bOk
Use(stream, flags, encoding)

Uses the specified stream .
Returns: Boolean. bOk
Write(str, length)

Writes a string to an open file.
Returns: SalNumber.
Write(binary, length)

Writes a binary buffer to an open file.
Returns: SalNumber.
Used By
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
Last updated