<?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%2FCSharp_Tutorial%2FFile_Directory_Stream%2FFileInfo</id>
		<title>Csharp/CSharp Tutorial/File Directory Stream/FileInfo - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2FFile_Directory_Stream%2FFileInfo"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/File_Directory_Stream/FileInfo&amp;action=history"/>
		<updated>2026-04-29T20:10:20Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/File_Directory_Stream/FileInfo&amp;diff=6804&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/File_Directory_Stream/FileInfo&amp;diff=6804&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</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/CSharp_Tutorial/File_Directory_Stream/FileInfo&amp;diff=6805&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/File_Directory_Stream/FileInfo&amp;diff=6805&amp;oldid=prev"/>
				<updated>2010-05-26T12:20: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;==Create FileStream from FileInfo for reading==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create FileStream from FileInfo for writing==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create StreamWriter from FileInfo==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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;
    StreamWriter MyStreamWriter = MyFile.CreateText();&lt;br /&gt;
    MyStreamWriter.Write(&amp;quot;a string&amp;quot;);&lt;br /&gt;
    MyStreamWriter.Close();&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File Sorter==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
    class FileSorter{&lt;br /&gt;
        static void SortAndShowFiles(string title,Comparison&amp;lt;FileInfo&amp;gt; sortOrder){&lt;br /&gt;
            FileInfo[] files = new DirectoryInfo(&amp;quot;C:\\&amp;quot;).GetFiles();&lt;br /&gt;
            Array.Sort(files, sortOrder);&lt;br /&gt;
            Console.WriteLine(title);&lt;br /&gt;
            foreach (FileInfo file in files){&lt;br /&gt;
                Console.WriteLine(&amp;quot;  {0} ({1} bytes)&amp;quot;,file.Name, file.Length);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        static void Main(){&lt;br /&gt;
            SortAndShowFiles(&amp;quot;Sorted by name:&amp;quot;,delegate(FileInfo first, FileInfo second)&lt;br /&gt;
                { return first.Name.rupareTo(second.Name); }&lt;br /&gt;
            );&lt;br /&gt;
        }&lt;br /&gt;
    }&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open an existing file and return a FileStream==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;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;
    FileStream MyStream;&lt;br /&gt;
    MyStream = MyFile.Open(FileMode.Open, FileAccess.Read, FileShare.None);&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Show info on image types==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.IO;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
&lt;br /&gt;
  class Program&lt;br /&gt;
  {&lt;br /&gt;
    static void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
      DirectoryInfo dir = new DirectoryInfo(@&amp;quot;C:\Windows\Web\Wallpaper&amp;quot;);&lt;br /&gt;
      FileInfo[] imageFiles = dir.GetFiles(&amp;quot;*.jpg&amp;quot;);&lt;br /&gt;
      Console.WriteLine(&amp;quot;Found {0} *.jpg files\n&amp;quot;, imageFiles.Length);&lt;br /&gt;
      foreach (FileInfo f in imageFiles)&lt;br /&gt;
      {&lt;br /&gt;
        Console.WriteLine(&amp;quot;File name: {0}&amp;quot;, f.Name);&lt;br /&gt;
        Console.WriteLine(&amp;quot;File size: {0}&amp;quot;, f.Length);&lt;br /&gt;
        Console.WriteLine(&amp;quot;Creation: {0}&amp;quot;, f.CreationTime);&lt;br /&gt;
        Console.WriteLine(&amp;quot;Attributes: {0}&amp;quot;, f.Attributes);&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>