|
-
Jan 15th, 2009, 10:28 AM
#1
File Permissions in VB2008
Hi,
I'm trying to put together a simple "file search" app that lets the user specify where to look, what type of files to look for, what the minimum file size is, etc. (I know...sounds kinda like capabilities that already exist in Windows!). I'm running into "access" issues, even with directories that I wouldn't think I should have any trouble accessing.
I'm doing something like this:
Dim f As New FileIOPermission(PermissionState.Unrestricted)
f.AllLocalFiles = FileIOPermissionAccess.Read
Try
f.Demand()
Catch s As SecurityException
Console.WriteLine(s.Message)
End Try
All I want to do is get the file attributes (size, location, name, date modified, etc.). I don't want/need write access.
Any suggestions? Thanks!
Bryce
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|