473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2036
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*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP12.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****@textcentric.lk> skrev i en meddelelse
news:OQ**************@TK2MSFTNGP11.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*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP12.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*****@hotmail.com> wrote in message
news:ef**************@tk2msftngp13.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****@textcentric.lk> skrev i en meddelelse
news:OQ**************@TK2MSFTNGP11.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*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP12.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
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...
6
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...
18
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....
7
by: etam | last post by:
Hi, is there any solution to iterate through all user profiles? Thanks in advance, Etam.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.