<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.IO%2FFileInfo</id>
		<title>Csharp/C Sharp by API/System.IO/FileInfo - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FC_Sharp_by_API%2FSystem.IO%2FFileInfo"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.IO/FileInfo&amp;action=history"/>
		<updated>2026-04-30T17:24:31Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.IO/FileInfo&amp;diff=4971&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.IO/FileInfo&amp;diff=4971&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:35Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.IO/FileInfo&amp;diff=4972&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/C_Sharp_by_API/System.IO/FileInfo&amp;diff=4972&amp;oldid=prev"/>
				<updated>2010-05-26T12:12:28Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==FileInfo.Attributes==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
class MainClass {&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        FileInfo file = new FileInfo(&amp;quot;data.txt&amp;quot;);&lt;br /&gt;
        Console.WriteLine(file.Attributes.ToString());&lt;br /&gt;
        if (file.Attributes == FileAttributes.ReadOnly) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;File is read-only (faulty test).&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        if ((file.Attributes &amp;amp; FileAttributes.ReadOnly) == FileAttributes.ReadOnly) {&lt;br /&gt;
            Console.WriteLine(&amp;quot;File is read-only (correct test).&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.CopyTo(String fileName)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;   &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main(string[] args)&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFile = new FileInfo(@&amp;quot;c:\Projects\Testing.txt&amp;quot;);&lt;br /&gt;
    MyFile.Create();&lt;br /&gt;
    MyFile.CopyTo(@&amp;quot;c:\Folder\Testing.txt&amp;quot;);&lt;br /&gt;
    //or&lt;br /&gt;
    MyFile.CopyTo(@&amp;quot;c:\Folder\Testing.txt&amp;quot;, true);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.Create()==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;   &lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main(string[] args)&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFile = new FileInfo(@&amp;quot;c:\Projects\Testing.txt&amp;quot;);&lt;br /&gt;
    MyFile.Create();&lt;br /&gt;
    MyFile.Delete();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.CreationTime==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class Example15_5 &lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
    [STAThread]&lt;br /&gt;
  public static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    // create and show an open file dialog&lt;br /&gt;
    OpenFileDialog dlgOpen = new OpenFileDialog();&lt;br /&gt;
    if (dlgOpen.ShowDialog() == DialogResult.OK)&lt;br /&gt;
    {&lt;br /&gt;
      // use the File class to return info about the file&lt;br /&gt;
      FileInfo fi = new FileInfo(dlgOpen.FileName);&lt;br /&gt;
      Console.WriteLine(&amp;quot;Filename &amp;quot; + fi.FullName );&lt;br /&gt;
      Console.WriteLine(&amp;quot; Created at &amp;quot; + fi.CreationTime );&lt;br /&gt;
      Console.WriteLine(&amp;quot; Accessed at &amp;quot; + fi.LastAccessTime );&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.Delete==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
class Class1 {&lt;br /&gt;
    static void Main(string[] args) {&lt;br /&gt;
        string[] cla = Environment.GetCommandLineArgs();&lt;br /&gt;
        if (cla.GetUpperBound(0) == 1) {&lt;br /&gt;
            FileInfo fi = new FileInfo(cla[1]);&lt;br /&gt;
            fi.Delete();&lt;br /&gt;
            Console.WriteLine(&amp;quot;File      : &amp;quot; + cla[1]);&lt;br /&gt;
            Console.WriteLine(&amp;quot;Attributes: &amp;quot; + fi.Attributes.ToString());&lt;br /&gt;
            Console.WriteLine(&amp;quot;File Deleted...&amp;quot;);&lt;br /&gt;
        } else&lt;br /&gt;
            Console.WriteLine(&amp;quot;Usage: rm &amp;lt;filename&amp;gt;&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.Directory==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
        FileInfo file = new FileInfo(&amp;quot;c:\\test.txt&amp;quot;);&lt;br /&gt;
        // Display directory information.&lt;br /&gt;
        DirectoryInfo dir = file.Directory;&lt;br /&gt;
        if (dir.Exists)&lt;br /&gt;
        {&lt;br /&gt;
            Console.Write(&amp;quot;Directory attribute list: &amp;quot;);&lt;br /&gt;
            Console.WriteLine(dir.Attributes.ToString());&lt;br /&gt;
            Console.WriteLine(&amp;quot;Directory contains: &amp;quot; + dir.GetFiles().Length.ToString() + &amp;quot; files&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.FullName==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
    public static int Main(string[] args)&lt;br /&gt;
    {      &lt;br /&gt;
    FileInfo f = new FileInfo(@&amp;quot;C:\Test.txt&amp;quot;);&lt;br /&gt;
    FileStream fs = f.Create();&lt;br /&gt;
    Console.WriteLine(&amp;quot;Creation: {0}&amp;quot;, f.CreationTime);&lt;br /&gt;
    Console.WriteLine(&amp;quot;Full name: {0}&amp;quot;, f.FullName);&lt;br /&gt;
    Console.WriteLine(&amp;quot;Full atts: {0}&amp;quot;, f.Attributes.ToString());&lt;br /&gt;
    fs.Close();&lt;br /&gt;
    f.Delete();      &lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.LastAccessTime==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class Example15_5 &lt;br /&gt;
{&lt;br /&gt;
    &lt;br /&gt;
    [STAThread]&lt;br /&gt;
  public static void Main() &lt;br /&gt;
  {&lt;br /&gt;
    // create and show an open file dialog&lt;br /&gt;
    OpenFileDialog dlgOpen = new OpenFileDialog();&lt;br /&gt;
    if (dlgOpen.ShowDialog() == DialogResult.OK)&lt;br /&gt;
    {&lt;br /&gt;
      // use the File class to return info about the file&lt;br /&gt;
      FileInfo fi = new FileInfo(dlgOpen.FileName);&lt;br /&gt;
      Console.WriteLine(&amp;quot;Filename &amp;quot; + fi.FullName );&lt;br /&gt;
      Console.WriteLine(&amp;quot; Created at &amp;quot; + fi.CreationTime );&lt;br /&gt;
      Console.WriteLine(&amp;quot; Accessed at &amp;quot; + fi.LastAccessTime );&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.MoveTo(String path)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;   &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main(string[] args)&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFile = new FileInfo(@&amp;quot;c:\Testing.txt&amp;quot;);&lt;br /&gt;
    MyFile.Create();&lt;br /&gt;
    MyFile.MoveTo(@&amp;quot;c:\MyFolder\Moved Testing.txt&amp;quot;);&lt;br /&gt;
    MyFile.MoveTo(@&amp;quot;C:\MyFolderNew&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.Open==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
class FileFileInfoApp&lt;br /&gt;
{&lt;br /&gt;
    static void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
        FileInfo f = new FileInfo(&amp;quot;Bar.txt&amp;quot;);&lt;br /&gt;
        FileStream fs = f.Create();&lt;br /&gt;
   &lt;br /&gt;
        StreamWriter w = new StreamWriter(fs);&lt;br /&gt;
        w.Write(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
        w.Close();&lt;br /&gt;
   &lt;br /&gt;
        fs = f.Open(FileMode.Open, FileAccess.Read, FileShare.None);&lt;br /&gt;
        StreamReader r = new StreamReader(fs);&lt;br /&gt;
        string t;&lt;br /&gt;
        while ((t = r.ReadLine()) != null){&lt;br /&gt;
            Console.WriteLine(t);&lt;br /&gt;
        }&lt;br /&gt;
        w.Close();&lt;br /&gt;
        fs.Close();&lt;br /&gt;
        f.Delete();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.OpenRead==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main(string[] args)&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFiles = new FileInfo(@&amp;quot;c:\Testing.txt&amp;quot;);&lt;br /&gt;
    FileStream MyFileStream1 = MyFiles.OpenRead();&lt;br /&gt;
    int MyBytes = MyFileStream1.ReadByte();&lt;br /&gt;
    MyFileStream1.Close();    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.OpenText==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class LicenseViewer {&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        FileInfo license = new FileInfo(&amp;quot;c:\\LICENSE.txt&amp;quot;);&lt;br /&gt;
        StreamReader txtIn = license.OpenText();&lt;br /&gt;
        String line;&lt;br /&gt;
        do {&lt;br /&gt;
            line = txtIn.ReadLine();&lt;br /&gt;
            Console.WriteLine(line);&lt;br /&gt;
        } while (line != null);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==FileInfo.OpenWrite()==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt; &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  static void Main(string[] args)&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFiles = new FileInfo(@&amp;quot;c:\Testing.txt&amp;quot;);&lt;br /&gt;
    FileStream MyFileStream1 = MyFiles.OpenWrite();&lt;br /&gt;
    byte MyWriteByte = 100;&lt;br /&gt;
    MyFileStream1.WriteByte(MyWriteByte);&lt;br /&gt;
    &lt;br /&gt;
    MyFileStream1.Close();    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==new FileInfo(String fileName)==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;  &lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
public class MainClass&lt;br /&gt;
{&lt;br /&gt;
  public static void Main()&lt;br /&gt;
  {&lt;br /&gt;
    FileInfo MyFile = new FileInfo(@&amp;quot;c:\Test.txt&amp;quot;);&lt;br /&gt;
    MyFile.Create();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>