473,587 Members | 2,550 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

iterating and filtering files using C#

Hi

I created a program using C#, which iterates files and displays these in a
listview. However I would like to filter the files, so files won't be
displayed if the current user hasn't "read access"

any clever way to do that in the .NET Framework using C#?

thanks

/Dan
Nov 15 '05 #1
3 2046
I bet you better keep the accessible file list in a sperate XML file which
you place in a directory, which created using the name of the user then as
the user login you just take the xml file and read the data sequentially
using a fast sequential xml reader like XMLtextreader class and display the
filenames in the lsitview, I guess you use system.io for these operation
right now, which is resourse wise costly if you have so many files in a one
folder.

Nirosh.

"Dan Kjaergaard" <dk*****@hotmai l.com> wrote in message
news:#2******** ******@TK2MSFTN GP12.phx.gbl...
Hi

I created a program using C#, which iterates files and displays these in a
listview. However I would like to filter the files, so files won't be
displayed if the current user hasn't "read access"

any clever way to do that in the .NET Framework using C#?

thanks

/Dan

Nov 15 '05 #2
Actually i use MS Index Server to search for files - the result is returned
in a DataReader which I iterate. The Index Server controls the files so it's
not possible for me to keep track of the users files using xml. I just get
the basic fileinformation as filename, path and so on...

any idea?

/Dan

"Champika Nirosh" <no****@textcen tric.lk> skrev i en meddelelse
news:OQ******** ******@TK2MSFTN GP11.phx.gbl...
I bet you better keep the accessible file list in a sperate XML file which
you place in a directory, which created using the name of the user then as
the user login you just take the xml file and read the data sequentially
using a fast sequential xml reader like XMLtextreader class and display the filenames in the lsitview, I guess you use system.io for these operation
right now, which is resourse wise costly if you have so many files in a one folder.

Nirosh.

"Dan Kjaergaard" <dk*****@hotmai l.com> wrote in message
news:#2******** ******@TK2MSFTN GP12.phx.gbl...
Hi

I created a program using C#, which iterates files and displays these in a listview. However I would like to filter the files, so files won't be
displayed if the current user hasn't "read access"

any clever way to do that in the .NET Framework using C#?

thanks

/Dan


Nov 15 '05 #3
I don't know much about MS Index Server, can it say the users, have access
to a particular file?
"Dan Kjaergaard" <dk*****@hotmai l.com> wrote in message
news:ef******** ******@tk2msftn gp13.phx.gbl...
Actually i use MS Index Server to search for files - the result is returned in a DataReader which I iterate. The Index Server controls the files so it's not possible for me to keep track of the users files using xml. I just get
the basic fileinformation as filename, path and so on...

any idea?

/Dan

"Champika Nirosh" <no****@textcen tric.lk> skrev i en meddelelse
news:OQ******** ******@TK2MSFTN GP11.phx.gbl...
I bet you better keep the accessible file list in a sperate XML file which
you place in a directory, which created using the name of the user then as the user login you just take the xml file and read the data sequentially
using a fast sequential xml reader like XMLtextreader class and display the
filenames in the lsitview, I guess you use system.io for these operation
right now, which is resourse wise costly if you have so many files in a

one
folder.

Nirosh.

"Dan Kjaergaard" <dk*****@hotmai l.com> wrote in message
news:#2******** ******@TK2MSFTN GP12.phx.gbl...
Hi

I created a program using C#, which iterates files and displays these

in a listview. However I would like to filter the files, so files won't be
displayed if the current user hasn't "read access"

any clever way to do that in the .NET Framework using C#?

thanks

/Dan



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
14793
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I want to look at that data and filter it based on what is in it. I know that this could have been done with data sets and data views in asp.net 1.1...
6
2038
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the data that was retrieved by the query. At times I may want the display control only to render some items in the set of data returned by...
18
1802
by: Drew | last post by:
All - I'm currently writing a toy program as I learn python that acts as a simple address book. I've run across a situation in my search function where I want to iterate across a filtered list. My code is working just fine, but I'm wondering if this is the most "elegant" way to do this. Essentially, I'm searching the dict self.contacts for...
7
2629
by: etam | last post by:
Hi, is there any solution to iterate through all user profiles? Thanks in advance, Etam.
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7973
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.