473,396 Members | 1,966 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,396 software developers and data experts.

Theology on Actual Directory vs. Variable Copy

Is there a way to get a copy of a "?:\" directory that includes, file name,
file create, last used, size, etc.?

It may get to the basic cost of overhead. It takes so many cycles to open a
connection, use this connection, then close it.

Is it cheaper to access files on a per file basis because the connection
time is cheap. Or is it better to access the files as a whole and deal with
it later.

Any thoughts.

Sep 5 '06 #1
4 1112
Russell,

What do you mean get a copy? Why not just use the File/FileInfo and the
Directory/DirectoryInfo classes in the System.IO namespace? What other
options do you have?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Russell" <no****@yahoo.comwrote in message
news:w1******************@bignews8.bellsouth.net.. .
Is there a way to get a copy of a "?:\" directory that includes, file
name, file create, last used, size, etc.?

It may get to the basic cost of overhead. It takes so many cycles to open
a connection, use this connection, then close it.

Is it cheaper to access files on a per file basis because the connection
time is cheap. Or is it better to access the files as a whole and deal
with it later.

Any thoughts.

Sep 5 '06 #2
"Russell" <no****@yahoo.comwrote in message
news:w1******************@bignews8.bellsouth.net.. .
As far as I know there are no religions that worship directories. =)

- Michael S
Sep 5 '06 #3
Russel,

For this it can be important what that "?:\" means, as it is a hard disk
than I would not think to long about it.

Cor

"Russell" <no****@yahoo.comschreef in bericht
news:w1******************@bignews8.bellsouth.net.. .
Is there a way to get a copy of a "?:\" directory that includes, file
name, file create, last used, size, etc.?

It may get to the basic cost of overhead. It takes so many cycles to open
a connection, use this connection, then close it.

Is it cheaper to access files on a per file basis because the connection
time is cheap. Or is it better to access the files as a whole and deal
with it later.

Any thoughts.

Sep 5 '06 #4
Russell wrote:
Is there a way to get a copy of a "?:\" directory that includes, file name,
file create, last used, size, etc.?

It may get to the basic cost of overhead. It takes so many cycles to open a
connection, use this connection, then close it.

Is it cheaper to access files on a per file basis because the connection
time is cheap. Or is it better to access the files as a whole and deal with
it later.
If I understand you correctly, by "connection" you mean opening and
closing a file or directory, and by "copy of a directory" you mean a
copy of the metadata for the directory, including file info etc.

Well, the underlying Win32 api, FindFirstFile & friends, returns basic
info including timestamp etc. in its iteration. That would probably
imply that using DirectoryInfo and calling GetFiles() or
GetFileSystemInfos() would be faster than using Directory.GetFiles(...)
/ etc. and then using File.Get* / etc.

However, the data in the second case will almost certainly be in the OS
filesystem cache so it won't really be much slower, and the overhead of
the initial I/O in both cases will be an astronomical number of cycles
if the data isn't already in the cache, so much so that this is like
bargaining for pennies on the cost of a car.

-- Barry

--
http://barrkel.blogspot.com/
Sep 5 '06 #5

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

Similar topics

8
by: John | last post by:
Greetings, I was talking to my host company representative this evening, and he thought that certain web crawlers (he mentioned Offline Explorer /and/ Anawave WebSnake would be able to download...
1
by: John Baker | last post by:
Hi: I need to copy the entire directory that my .mdb file is sitting in to another drive and directory, and am having trouble with the syntax. The following is intended to copy the contents...
2
by: Wysiwyg | last post by:
I am using MS Visual Studio 2002 with Windows 2000 Advanced Server and am starting to learn C#. Perhaps this is obvious but I can't see if what's happening is "normal" or if something needs to be...
23
by: **Developer** | last post by:
Is there an easy way to copies all files in a directory into another directory? What about coping subdirectories too? Thanks in advance for any info
12
by: samoore33 | last post by:
I found a real nice article on how to copy a directory on MSDN. The only problem is that I can not figure out how to get the namespace Microsoft.VisualBasic.MyServices. I wanted to know if anyone...
4
by: Robert | last post by:
Greetings New to Visual Studio 2008. Always us VB6.0 SP5. I am trying to copy files from A to B. I select a directory, and copy files. Works ok, but it does not create the directory first. ...
7
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi just wondering if there is any sample code to copy files from one directory into another with the code behind a button click event? Using c# vs2005. Thanks. -- Paul G Software engineer.
11
by: Dijkstra | last post by:
Hi folks! First, this is the code I'm using to expose the problem: ------------------------------------------------------------------ #include <functional> #include <string> #include...
10
by: Jason | last post by:
I want to create a simple program with Two buttons on the form. BUTTON 1 - BACKUP PREFS this will do the following: Copy C:\Documents and Settings\%USERNAME%\Application Data\FileZilla...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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,...

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.