//------------------------------------------------------------------------------
//
-// 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
internal void CheckPath (string path)
{
if (path == null)
- throw new ArgumentNullException ();
+ throw new ArgumentNullException ("path");
+
+ if (path.Length == 0)
+ 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;