AddStream(DestinationURL: String; FileName: String; Stream: IIOStream);
None
DestinationURL. Relative path to the list according to which the file is available.
FileName. The name by which the file is available in the shared access on the site.
Stream. The Stream connected to the file that must be published on the site.
The AddStream method adds a file to the site for shared access.
Executing the example requires the SharePoint site located by the http://test-sharepoint address.
Sub UserProc;
Var
Site: ISharePointSite;
Web: ISharePointWeb;
FStream: IFileStream;
Begin
Site := New SharePointSite.Create;
Site.Url := "http://test-sharepoint";
Site.UseDefaultCredentials := True;
FStream := New FileStream.Create("c:\Work.Doc", FileOpenMode.ReadWrite, FileShare.DenyWrite);
Web := Site.RootWeb;
Web.Files.AddStream("Shared Documents", "Work.Doc", FStream);
Dispose FStream;
End Sub UserProc;
On executing an example the connection to the SharePoint site is performed. Selected file is published on this site for the shared access.
See also: