Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
FileEvent.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 namespace SiliconStudio.Core.IO
6 {
7  /// <summary>
8  /// Ä file event used notified by <see cref="DirectoryWatcher"/>
9  /// </summary>
10  public sealed class FileEvent : EventArgs
11  {
12  private readonly FileEventChangeType changeType;
13  private readonly string name;
14  private readonly string fullPath;
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref="FileEvent"/> class.
18  /// </summary>
19  /// <param name="changeType">Type of the change.</param>
20  /// <param name="name">The name.</param>
21  /// <param name="fullPath">The full path.</param>
22  public FileEvent(FileEventChangeType changeType, string name, string fullPath)
23  {
24  this.changeType = changeType;
25  this.name = name;
26  this.fullPath = fullPath;
27  }
28 
29  /// <summary>
30  /// Gets the type of the change.
31  /// </summary>
32  /// <value>The type of the change.</value>
33  public FileEventChangeType ChangeType
34  {
35  get
36  {
37  return changeType;
38  }
39  }
40 
41  /// <summary>
42  /// Gets the name.
43  /// </summary>
44  /// <value>The name.</value>
45  public string Name
46  {
47  get
48  {
49  return name;
50  }
51  }
52 
53  /// <summary>
54  /// Gets the full path.
55  /// </summary>
56  /// <value>The full path.</value>
57  public string FullPath
58  {
59  get
60  {
61  return fullPath;
62  }
63  }
64 
65  public override string ToString()
66  {
67  return string.Format("{0}: {1}", changeType, fullPath);
68  }
69  }
70 }
override string ToString()
Definition: FileEvent.cs:65
FileEventChangeType
Change type of file used by FileEvent and DirectoryWatcher.
Ä file event used notified by DirectoryWatcher
Definition: FileEvent.cs:10
FileEvent(FileEventChangeType changeType, string name, string fullPath)
Initializes a new instance of the FileEvent class.
Definition: FileEvent.cs:22