2005-08-11 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / corlib / System.IO / FileSystemInfo.cs
index 9d92a8bc44be48827b33938224ab3ecc5bb27a6e..b8c1909ff24b5b0e89eddcb9299478fd544bcf19 100644 (file)
@@ -11,7 +11,7 @@
 //------------------------------------------------------------------------------
 
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
+using System.Security.Permissions;
 
 namespace System.IO {
        
        [Serializable]
+       [FileIOPermission (SecurityAction.InheritanceDemand, Unrestricted = true)]
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        public abstract class FileSystemInfo : MarshalByRefObject, ISerializable {
                #region Implementation of ISerializable
 
@@ -238,13 +242,13 @@ namespace System.IO {
                internal void CheckPath (string path)
                {
                        if (path == null)
-                               throw new ArgumentNullException ();
+                               throw new ArgumentNullException ("path");
                        
                        if (path.Length == 0)
-                               throw new ArgumentException ("empty path");
+                               throw new ArgumentException ("path", Locale.GetText ("Empty path."));
                        
                        if (path.IndexOfAny (Path.InvalidPathChars) != -1)
-                               throw new ArgumentException ("Invalid characters in path.");
+                               throw new ArgumentException ("path", Locale.GetText ("Invalid characters in path."));
                }
 
                internal MonoIOStat stat;