File Permissions

Advertisement

mwinner
Joined:
Posts:
2

File Permissions

Does anybody know why, when I use:

Dim transferOptions As New TransferOptions
transferOptions.TransferMode = TransferMode.Binary

transferOptions.FilePermissions.Numeric = 775
Dim transferResult As TransferOperationResult

I get an error pointing to: transferOptions.FilePermissions.Numeric = 775, saying "Object reference not set to an instance of an object."? It works perfectly without it, but I need certain permissions set. No matter how I set such permissions, it doesn't seem to work.

Thanks!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: File Permissions

TransferOptions.FilePermissions defaults to Null.
So you need to create an instance of FilePermissions first:
Dim transferOptions As New TransferOptions
Set transferOptions.FilePermissions = New FilePermissions
Then, you probably wanted to do:
transferOptions.FilePermissions.Octal = "755"

Reply with quote

Advertisement

You can post new topics in this forum