using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
-
-#if !NET_2_1
using System.Security.AccessControl;
-#endif
namespace System.IO {
}
}
-#if !NET_2_1
public bool IsReadOnly {
get {
if (!Exists)
// handling this exception to work properly.
throw new NotSupportedException (Locale.GetText ("File encryption isn't supported on any file system."));
}
-#endif
public long Length {
get {
public override string ToString ()
{
-#if NET_2_1
- // for Moonlight we *never* return paths, since ToString is not [SecurityCritical] we simply return the Name
- return Name;
-#else
return OriginalPath;
-#endif
}
-#if !NET_2_1
public FileSecurity GetAccessControl ()
{
return File.GetAccessControl (FullPath);
{
File.SetAccessControl (FullPath, fileSecurity);
}
-#endif
}
}