General information
Title:
Directory Permissions
Dear Colleagues,
In a VB.NET program, I'm trying to check whether the user has permissions to write to a certain directory on a Novel server, like this:
DataDir = "Z:\apps\help"
Try
DirInfo = New System.IO.DirectoryInfo(DataDir)
If (DirInfo.Attributes And Sytestem.IO.FileAttributes.ReadOnly) > 0 Then
problems += "Directory has read-only access." + Chr(13) + Chr(10)
End If
Catch e As System.IO.DirectoryNotFoundException
problems += "Data Directory " + DataDir + " not found." + Chr(13) + Chr(10)
End Try
I know for certain that I have read-only access "Z:\apps\help". The only attributes that get set in the DirectoryInfo object is the Directory attribte, but not the read-only attribute.
Does anyone know if this is the correct way to go about this?
Thanks
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only