FolderItem.IsWriteable

From Xojo Documentation

Read-Only Property (As Boolean )
BooleanValue = aFolderItem.IsWriteable

Supported for all project types and targets.

IsWriteable is True if you have permissions to write to the FolderItem.

Notes

Even if IsWriteable is True, an attempt to write may fail for other reasons, such as coding errors or insufficient disk space for the information to be written. For example, a write may fail because disk space runs out midway through the write operation. IsWriteable is not intended to check for that condition. If your intention is to write to a file, you should simply attempt to do so.

Example

This example checks the IsWritable flag prior to doing the write.

Var f As New FolderItem
f = FolderItem.ShowOpenFileDialog("text/plain")
If f.IsWriteable Then
// conduct the write operation
Else
MessageBox("You cannot write to the file!")
End If