473,396 Members | 1,734 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.

FileInfo class

Hello!

In the FileInfo class there are several properties where you can manipulate
the file for example
the date and time that the current file was last written to.

This sound strange assume I have a file where there is a date and time where
this file was last written to then
someone else manipulate this date and time and set a competely different
date and time.

This mean that the date and time for the specified file in not to be trusted
because
this date and time might have been manipulated.

Is my thought correct here?

//Tony
Aug 10 '08 #1
1 1367
Tony Johansson wrote:
In the FileInfo class there are several properties where you can manipulate
the file for example
the date and time that the current file was last written to.

This sound strange assume I have a file where there is a date and time where
this file was last written to then
someone else manipulate this date and time and set a competely different
date and time.

This mean that the date and time for the specified file in not to be trusted
because
this date and time might have been manipulated.

Is my thought correct here?
I don't know, I don't really understand what you're getting at.

If you mean that file info can be manipulated, then of course it can. Anyone
with access to the file can modify anything they like about the file,
including the access, creation and modification times. Modifying the last
modified time is called "touching" the file, and the utility that does it is
called "touch".

--
J.
Aug 10 '08 #2

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

Similar topics

4
by: G. Richard Bellamy | last post by:
I'm trying to unset the Encrypted attribute on all the files in a path. The attribute is not getting set. What am I doing wrong? Perhaps there's another newsgroup I can send this to? Here's...
1
by: RK | last post by:
private const string appdir = "http://localhost/myApp"; string strPath = appdir + "/xml/test.log"; FileInfo f = new FileInfo(strPath); the above code throwing error, like URI formats are not...
3
by: Sam | last post by:
Hello, I just want to check something. I have two objects of FileInfo. FileInfo f1 = new FileInfo(“sam.exe”); FileInfo f2 = new FileInfo(“sam.exe”); If I use the f1.Equals(f2); it...
2
by: John Bowman | last post by:
Hi All, ..NET 1.1... I'm wondering if there is any approach more convenient to get a list of FileInfo objects than the following. For example, if I wanted to get 1 list of all the Exe's and all...
5
by: Lance | last post by:
I want to expose properties of a class to a user via a PropertyGrid class. Some of the properties are of type System.IO.FileInfo. Ideally, an OpenFileDialog window would appear when the user...
1
by: Benjamin | last post by:
I am trying to make a file I created a hidden file. I think I need to use the setfileattribute() but I cannot find it anywhere. I found this on msdn:...
5
by: mike | last post by:
Hi, I have been playing with VB.NET/C# for getting some general properties of a fileinfo object. However, FileInfo object does not seem to expose some of the basic properties like TYPE that used...
1
by: Michael A. Covington | last post by:
I just saw something like this in someone else's code and am curious... string fname; .... store a filename in fn ... FileInfo fi = new FileInfo(fname); string name = fi.Name;
0
by: Alan | last post by:
When using FileInfo class remember fs.Close(); otherwise it holds on to the connection public static void LogErrorsToFile(string sException, string sfile, string sMethod) { string...
3
by: rn5a | last post by:
To work with files, when should one use the File class & when should one use the FileInfo class? Similarly, to work with directories, when should one use the Directory class & when should one...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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...

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.