J
Jarod_24
What is wrong here. This thing allways returns true.
I want a simple way to see if a file is write protected.
'strFilename' holds the path for the file
Dim isWriteProtected As Boolean =
IO.File.GetAttributes(strFilename).IsDefined(FileAttribute.ReadOnly.GetType,
FileAttribute.ReadOnly)
If (isWriteProtected) Then Throw New Exception("File specified in 'Filename'
is write-protected")
I want a simple way to see if a file is write protected.
'strFilename' holds the path for the file
Dim isWriteProtected As Boolean =
IO.File.GetAttributes(strFilename).IsDefined(FileAttribute.ReadOnly.GetType,
FileAttribute.ReadOnly)
If (isWriteProtected) Then Throw New Exception("File specified in 'Filename'
is write-protected")