Name
Stream.LoadFromFile Method — (Versions 2.5, 2.6)
Synopsis
stream.LoadFromFile FileName
The LoadFromFile method loads a file contents into an already open Stream object.
Arguments
-
FileName(String) Must contain a name of a valid file to be loaded into the currently opened Stream object. If the file specified by this argument cannot be found, a runtime error occurs.
Description
The LoadFromFile method works only with an already opened Stream
object, replacing the contents of the object with the contents of the
file specified within the LoadFromFile argument,
FileName. All pre-existing data is
overwritten, and any extra data is truncated. However, the Stream
object does not lose its relationship to the resource with which it
was originally opened.
The LoadFromFile method can be used to upload a file to a server from a client.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access