Retrieves a Stream for the file associated with the current version of the asset.
A Stream is a view of the bytes of the file.
Namespace: Ingeniux.CMSAssembly: Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.492
SyntaxStream Stream(
bool writeMode = false
)
Function Stream (
Optional writeMode As Boolean = false
) As Stream
Stream^ Stream(
bool writeMode = false
)
abstract Stream :
?writeMode : bool
(* Defaults:
let _writeMode = defaultArg writeMode false
*)
-> Stream Parameters
- writeMode Boolean (Optional)
- Determines whether the retrieved Stream can be written to. Defaults to false.
Return Value
StreamStream of the associated file.
Example
Example of using Stream in a custom hook:
var filePath = string.Format("c:\archive\{0}{1}", asset.Name);
using (FileStream fs = System.IO.File.Create(filePath))
{
asset.Stream.Seek(0, SeekOrigin.Begin);
asset.Stream.CopyTo(fs);
fs.Flush();
fs.Close();
}
See Also