WriteBytes
Write file in bytes.
Task version: 1.1.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Task Parameters
ContentBytes : Object
Source directory.
Default: -
Example: VGhpcyBpcyBhIHRlc3QgZmlsZS4=
Path : String
Full path of the target file to be written
Default: -
Example: c:\temp\foo.txt
UseGivenUserCredentialsForRemoteConnections : Boolean
If set, allows you to give the user credentials to use to delete files on remote hosts.
If not set, the agent service user credentials will be used.
Note: This feature is only possible with Windows agents.
Default: False
Example: true
UserName : String
This needs to be of format domain\username
Default: "domain\username"
Example: domain\username
🗝Password : String
Password for the used credentials.
Default: -
Example: testpwd
WriteBehaviour : WriteBehaviour
How the file write should work if a file with the new name already exists
Possible values:
Append: Throw an error and roll back all transfers.Overwrite: Overwrite the target file.Throw: Rename the transferred file by appending a number to the end.
Default: Throw
Example: WriteBehaviour.Throw
Task Result
Path : String
Full path to the file.
Example: c:\temp\foo.txt
SizeInMegaBytes : Double
Size of the written file in mega bytes.
Example: 32
Task Changelog
Changelog for Task Frends.Files.WriteBytes.
[1.1.0] - 2025-03-19
Changed
Update packages: Microsoft.Extensions.FileSystemGlobbing 7.0.0 -> 9.0.3 System.ComponentModel.Annotations 4.7.0 -> 5.0.0 System.DirectoryServices 7.0.0 -> 8.0.0
[1.0.1] - 2023-08-10
Fixed
Fixed memory leak from ExecuteWriteBytes by adding using statement when opening a new MewmoryStream.
[1.0.0] - 2023-04-17
Added
Initial implementation
Last updated
Was this helpful?

