473,405 Members | 2,444 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,405 software developers and data experts.

DirectoryInfo and file attributes

10
I am using an instance of DirectoryInfo to browse and retrive the files and some file attributes on a physical directory. This is displayed in a html table. But if you have for example text files (.txt) or word dokuments (.docx) How can I display the correct icon that is associated with the file in my html table? And further on how can I reach the user who modified the file the last time? Where is that info saved?

Is the DirectoryInfo the object I should use for this purpose? or are there other objects or functions that I should looking at?

If someone has some hints to guide me further on this I would appreciate your answers.
//Kent Andersson
Mar 31 '10 #1
3 1860
tlhintoq
3,525 Expert 2GB
The user who last edited a file is not recorded. So you're already done with that one! Hurray!

The icon... I'm going to guess you'll need to make a bunch of .jpgs to send over the 'net.
Mar 31 '10 #2
Frinavale
9,735 Expert Mod 8TB
I think I would save the images associated to the file types into a resx resource and retrieve the resource for the file type using a ResourceManager.

-Frinny
Mar 31 '10 #3
Kenta
10
Ok that makes it clearer. I will look at the resourcesmanager, it might work. 1 of 2 problems perhaps solved. If the last modified user is not saved i guess i can cheat and store the user who last uploaded the file. Because it is a user accessed Intranet (demands login).If uploaded it should be modified and not only accessed to read.

//Kent
Apr 1 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Vagabond Software | last post by:
I am recursing through ALL folders and sub-folders below a certain level to list all the files of a certain type in those folders. I use two ArrayLists, alFiles and alFolders, to track matching...
0
by: I am Sam | last post by:
I keep getting an error that my listbox control is incompatible with the source as follows: The base class includes the field 'IMGList', but its type (System.IO.DirectoryInfo) is not compatible...
0
by: Glenn Venzke | last post by:
I have an aspx page that is set up to copy backed-up DB files from a shared directory to a local folder. For some reason, it is being denied access to the network share. I have the web app running...
8
by: Lyners | last post by:
I have code that retrieves all of the file names within a directory. After retriving them, I display the information in a datagrid. What I would like to do is add an extra output column on the...
3
by: xenophon | last post by:
This following innocuous code: System.IO.DirectoryInfo fff = new System.IO.DirectoryInfo(); System.IO.FileInfo ppp = fff.GetFiles( Request.MapPath(".") ); for( int ccc=0 ; ccc < ppp.Length ;...
4
by: Rachel | last post by:
I have tried: System.IO.File.Create("C:\FolderName") It does not create a folder. Any ideas without using the File System Object? Rachel
1
by: mgonzales3 | last post by:
I'm trying to compare DirectoryInfo.Attributes to FileAttributes like so: // result returning // Directory | Archive DirectoryInfo info = new DirectoryInfo(this.folderFullName); if...
2
by: Tophog | last post by:
I haven't done a lot of file I/O in .NET and thought I had this figured out. I am simply wanting to move a UNC-based directory path to a new path using DirectoryInfo. Example: Source...
2
by: rn5a | last post by:
Suppose I have the following code: <script runat="server"> Sub Page_Load(.....) Dim dInfo As DirectoryInfo Dim fsi As FileSystemInfo dInfo = New DirectoryInfo(Server.MapPath("Folder1")) ...
5
by: Tom P. | last post by:
I am having the following problem: I create a FileSystemWatcher and wait for events. When the event does happen I refresh a FileSystemInfo list and set properties accordingly (IsFile, IsDir,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.