Index: /branches/eraser6/Util/StreamInfo.cs
===================================================================
--- /branches/eraser6/Util/StreamInfo.cs	(revision 1048)
+++ /branches/eraser6/Util/StreamInfo.cs	(revision 1049)
@@ -116,6 +116,6 @@
 		public FileAttributes Attributes
 		{
-			get { return System.IO.File.GetAttributes(fileName); }
-			set { System.IO.File.SetAttributes(fileName, value); }
+			get { return (FileAttributes)KernelApi.NativeMethods.GetFileAttributes(FullName); }
+			set { KernelApi.NativeMethods.SetFileAttributes(FullName, (uint)value); }
 		}
 		
Index: /branches/eraser6/Util/KernelApi.cs
===================================================================
--- /branches/eraser6/Util/KernelApi.cs	(revision 1048)
+++ /branches/eraser6/Util/KernelApi.cs	(revision 1049)
@@ -273,5 +273,5 @@
 			/// or if you call CloseHandle on a handle returned by the FindFirstFile
 			/// function.</returns>
-			[DllImport("Kernel32.dll", SetLastError = true)]
+			[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
 			[return: MarshalAs(UnmanagedType.Bool)]
 			public static extern bool CloseHandle(IntPtr hObject);
@@ -290,5 +290,5 @@
 			/// If the function fails, the return value is zero (0). To get extended
 			/// error information, call Marshal.GetLastWin32Error().</returns>
-			[DllImport("Kernel32.dll", SetLastError = true)]
+			[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
 			[return: MarshalAs(UnmanagedType.Bool)]
 			public static extern bool DeleteFile(string lpFileName);
@@ -755,4 +755,38 @@
 			public const ushort COMPRESSION_FORMAT_DEFAULT = 0x0001;
 
+
+			/// <summary>
+			/// Retrieves a set of FAT file system attributes for a specified file or
+			/// directory.
+			/// </summary>
+			/// <param name="lpFileName">The name of the file or directory.</param>
+			/// <returns>If the function succeeds, the return value contains the attributes
+			/// of the specified file or directory.
+			/// 
+			/// If the function fails, the return value is INVALID_FILE_ATTRIBUTES.
+			/// To get extended error information, call Marshal.GetLastWin32Error.
+			/// 
+			/// The attributes can be one or more of the FILE_ATTRIBUTE_* values.</returns>
+			[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+			public static extern uint GetFileAttributes(string lpFileName);
+
+			/// <summary>
+			/// Sets the attributes for a file or directory.
+			/// </summary>
+			/// <param name="lpFileName">The name of the file whose attributes are
+			/// to be set.</param>
+			/// <param name="dwFileAttributes">The file attributes to set for the file.
+			/// This parameter can be one or more of the FILE_ATTRIBUTE_* values.
+			/// However, all other values override FILE_ATTRIBUTE_NORMAL.</param>
+			/// <returns>If the function succeeds, the return value is nonzero.
+			/// 
+			/// If the function fails, the return value is zero. To get extended error
+			/// information, call Marshal.GetLastWin32Error.</returns>
+			[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2205:UseManagedEquivalentsOfWin32Api")]
+			[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
+			[return: MarshalAs(UnmanagedType.Bool)]
+			public static extern bool SetFileAttributes(string lpFileName,
+				uint dwFileAttributes);
+
 			/// <summary>
 			/// Retrieves the size of the specified file.
