From 8f708d9159a6780c93cac3908942354bf90db1ad Mon Sep 17 00:00:00 2001 From: Tim Coleman Date: Sat, 17 Aug 2002 06:28:37 +0000 Subject: 2002-08-15 Tim Coleman * ErrorEventArgs.cs: * ErrorEventHandler.cs: * FileSystemEventArgs.cs: * FileSystemEventHandler.cs: * FileSystemWatcher.cs: * InternalBufferOverflowException.cs: * IODescriptionAttribute.cs: * NotifyFilters.cs: * RenamedEventArgs.cs: * RenamedEventHandler.cs: * WaitForChangedResult.cs: * WatcherChangeTypes.cs: New stubs added. svn path=/trunk/mcs/; revision=6698 --- mcs/class/System/System.IO/ChangeLog | 15 +++++++ mcs/class/System/System.IO/ErrorEventArgs.cs | 39 +++++++++++++++++ mcs/class/System/System.IO/ErrorEventHandler.cs | 15 +++++++ mcs/class/System/System.IO/FileSystemEventArgs.cs | 51 ++++++++++++++++++++++ .../System/System.IO/FileSystemEventHandler.cs | 15 +++++++ .../System/System.IO/IODescriptionAttribute.cs | 40 +++++++++++++++++ .../System.IO/InternalBufferOverflowException.cs | 41 +++++++++++++++++ mcs/class/System/System.IO/NotifyFilters.cs | 25 +++++++++++ mcs/class/System/System.IO/RenamedEventArgs.cs | 44 +++++++++++++++++++ mcs/class/System/System.IO/RenamedEventHandler.cs | 15 +++++++ mcs/class/System/System.IO/WaitForChangedResult.cs | 48 ++++++++++++++++++++ mcs/class/System/System.IO/WatcherChangeTypes.cs | 22 ++++++++++ 12 files changed, 370 insertions(+) create mode 100644 mcs/class/System/System.IO/ErrorEventArgs.cs create mode 100644 mcs/class/System/System.IO/ErrorEventHandler.cs create mode 100644 mcs/class/System/System.IO/FileSystemEventArgs.cs create mode 100644 mcs/class/System/System.IO/FileSystemEventHandler.cs create mode 100644 mcs/class/System/System.IO/IODescriptionAttribute.cs create mode 100644 mcs/class/System/System.IO/InternalBufferOverflowException.cs create mode 100644 mcs/class/System/System.IO/NotifyFilters.cs create mode 100644 mcs/class/System/System.IO/RenamedEventArgs.cs create mode 100644 mcs/class/System/System.IO/RenamedEventHandler.cs create mode 100644 mcs/class/System/System.IO/WaitForChangedResult.cs create mode 100644 mcs/class/System/System.IO/WatcherChangeTypes.cs (limited to 'mcs/class') diff --git a/mcs/class/System/System.IO/ChangeLog b/mcs/class/System/System.IO/ChangeLog index f6ad9824770..0ab96842552 100755 --- a/mcs/class/System/System.IO/ChangeLog +++ b/mcs/class/System/System.IO/ChangeLog @@ -1,3 +1,18 @@ +2002-08-15 Tim Coleman + * ErrorEventArgs.cs: + * ErrorEventHandler.cs: + * FileSystemEventArgs.cs: + * FileSystemEventHandler.cs: + * FileSystemWatcher.cs: + * InternalBufferOverflowException.cs: + * IODescriptionAttribute.cs: + * NotifyFilters.cs: + * RenamedEventArgs.cs: + * RenamedEventHandler.cs: + * WaitForChangedResult.cs: + * WatcherChangeTypes.cs: + New stubs added. + 2002-07-20 Dick Porter * MonoIO.cs: Cut down copy of corlib/System.IO/MonoIO.cs, so it diff --git a/mcs/class/System/System.IO/ErrorEventArgs.cs b/mcs/class/System/System.IO/ErrorEventArgs.cs new file mode 100644 index 00000000000..49bc2c08677 --- /dev/null +++ b/mcs/class/System/System.IO/ErrorEventArgs.cs @@ -0,0 +1,39 @@ +// +// System.IO.ErrorEventArgs.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + public class ErrorEventArgs : EventArgs { + + #region Fields + + Exception exception; + + #endregion // Fields + + #region Constructors + + public ErrorEventArgs (Exception exception) + { + this.exception = exception; + } + + #endregion // Constructors + + #region Methods + + public virtual Exception GetException () + { + return exception; + } + + #endregion // Methods + } +} diff --git a/mcs/class/System/System.IO/ErrorEventHandler.cs b/mcs/class/System/System.IO/ErrorEventHandler.cs new file mode 100644 index 00000000000..b4efe2d5b30 --- /dev/null +++ b/mcs/class/System/System.IO/ErrorEventHandler.cs @@ -0,0 +1,15 @@ +// +// System.IO.ErrorEventHandler.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + [Serializable] + public delegate void ErrorEventHandler (object sender, ErrorEventArgs e); +} diff --git a/mcs/class/System/System.IO/FileSystemEventArgs.cs b/mcs/class/System/System.IO/FileSystemEventArgs.cs new file mode 100644 index 00000000000..b4595d49f1c --- /dev/null +++ b/mcs/class/System/System.IO/FileSystemEventArgs.cs @@ -0,0 +1,51 @@ +// +// System.IO.FileSystemEventArgs.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + public class FileSystemEventArgs : EventArgs { + + #region Fields + + WatcherChangeTypes changeType; + string directory; + string name; + + #endregion // Fields + + #region Constructors + + public FileSystemEventArgs (WatcherChangeTypes changeType, string directory, string name) + { + this.changeType = changeType; + this.directory = directory; + this.name = name; + } + + #endregion // Constructors + + #region Properties + + public WatcherChangeTypes ChangeType { + get { return changeType; } + } + + public string FullPath { + [MonoTODO] + get { throw new NotImplementedException (); } + } + + public string Name { + get { return name; } + } + + #endregion // Properties + } +} diff --git a/mcs/class/System/System.IO/FileSystemEventHandler.cs b/mcs/class/System/System.IO/FileSystemEventHandler.cs new file mode 100644 index 00000000000..aa0efed9e41 --- /dev/null +++ b/mcs/class/System/System.IO/FileSystemEventHandler.cs @@ -0,0 +1,15 @@ +// +// System.IO.FileSystemEventHandler.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + [Serializable] + public delegate void FileSystemEventHandler (object sender, FileSystemEventArgs e); +} diff --git a/mcs/class/System/System.IO/IODescriptionAttribute.cs b/mcs/class/System/System.IO/IODescriptionAttribute.cs new file mode 100644 index 00000000000..10e22173cc7 --- /dev/null +++ b/mcs/class/System/System.IO/IODescriptionAttribute.cs @@ -0,0 +1,40 @@ +// +// System.IO.IODescriptionAttribute.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; +using System.ComponentModel; + +namespace System.IO { + [AttributeUsage (AttributeTargets.All)] + public class IODescriptionAttribute : DescriptionAttribute { + + #region Fields + + string description; + + #endregion // Fields + + #region Constructors + + public IODescriptionAttribute (string description) + : base (description) + { + } + + #endregion // Constructors + + #region Methods + + public override string Description { + get { return DescriptionValue; } + } + + #endregion // Methods + } +} diff --git a/mcs/class/System/System.IO/InternalBufferOverflowException.cs b/mcs/class/System/System.IO/InternalBufferOverflowException.cs new file mode 100644 index 00000000000..1c30e97cf09 --- /dev/null +++ b/mcs/class/System/System.IO/InternalBufferOverflowException.cs @@ -0,0 +1,41 @@ +// +// System.IO.InternalBufferOverflowException.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; +using System.Runtime.Serialization; + +namespace System.IO { + [Serializable] + public class InternalBufferOverflowException : SystemException { + + #region Constructors + + public InternalBufferOverflowException () + : base ("Internal buffer overflow occurred.") + { + } + + public InternalBufferOverflowException (string message) + : base (message) + { + } + + public InternalBufferOverflowException (SerializationInfo info, StreamingContext context) + : base (info, context) + { + } + + public InternalBufferOverflowException (string message, Exception innerException) + : base (message, innerException) + { + } + + #endregion // Constructors + } +} diff --git a/mcs/class/System/System.IO/NotifyFilters.cs b/mcs/class/System/System.IO/NotifyFilters.cs new file mode 100644 index 00000000000..d06c72e3e15 --- /dev/null +++ b/mcs/class/System/System.IO/NotifyFilters.cs @@ -0,0 +1,25 @@ +// +// System.IO.NotifyFilters.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + [Flags] + [Serializable] + public enum NotifyFilters { + Attributes, + CreationTime, + DirectoryName, + FileName, + LastAccess, + LastWrite, + Security, + Size + } +} diff --git a/mcs/class/System/System.IO/RenamedEventArgs.cs b/mcs/class/System/System.IO/RenamedEventArgs.cs new file mode 100644 index 00000000000..134dca7a4b1 --- /dev/null +++ b/mcs/class/System/System.IO/RenamedEventArgs.cs @@ -0,0 +1,44 @@ +// +// System.IO.RenamedEventArgs.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + public class RenamedEventArgs : FileSystemEventArgs { + + #region Fields + + string oldName; + + #endregion // Fields + + #region Constructors + + public RenamedEventArgs (WatcherChangeTypes changeType, string directory, string name, string oldName) + : base (changeType, directory, name) + { + this.oldName = oldName; + } + + #endregion // Constructors + + #region Properties + + public string OldFullPath { + [MonoTODO] + get { throw new NotImplementedException (); } + } + + public string OldName { + get { return oldName; } + } + + #endregion // Properties + } +} diff --git a/mcs/class/System/System.IO/RenamedEventHandler.cs b/mcs/class/System/System.IO/RenamedEventHandler.cs new file mode 100644 index 00000000000..50b28412391 --- /dev/null +++ b/mcs/class/System/System.IO/RenamedEventHandler.cs @@ -0,0 +1,15 @@ +// +// System.IO.FileSystemEventHandler.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + [Serializable] + public delegate void RenamedEventHandler (object sender, RenamedEventArgs e); +} diff --git a/mcs/class/System/System.IO/WaitForChangedResult.cs b/mcs/class/System/System.IO/WaitForChangedResult.cs new file mode 100644 index 00000000000..e2e33cd95d7 --- /dev/null +++ b/mcs/class/System/System.IO/WaitForChangedResult.cs @@ -0,0 +1,48 @@ +// +// System.IO.WaitForChangedResult.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + public struct WaitForChangedResult { + + #region Fields + + WatcherChangeTypes changeType; + string name; + string oldName; + bool timedOut; + + #endregion // Fields + + #region Properties + + public WatcherChangeTypes ChangeType { + get { return changeType; } + set { changeType = value; } + } + + public string Name { + get { return name; } + set { name = value; } + } + + public string OldName { + get { return oldName; } + set { oldName = value; } + } + + public bool TimedOut { + get { return timedOut; } + set { timedOut = value; } + } + + #endregion // Properties + } +} diff --git a/mcs/class/System/System.IO/WatcherChangeTypes.cs b/mcs/class/System/System.IO/WatcherChangeTypes.cs new file mode 100644 index 00000000000..5455c9921bc --- /dev/null +++ b/mcs/class/System/System.IO/WatcherChangeTypes.cs @@ -0,0 +1,22 @@ +// +// System.IO.WatcherChangeTypes.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// + +using System; + +namespace System.IO { + [Flags] + [Serializable] + public enum WatcherChangeTypes { + All, + Changed, + Created, + Deleted, + Renamed + } +} -- cgit v1.2.3