<Type Name="Sync" FullName="Gnome.Vfs.Sync">
  <TypeSignature Language="C#" Value="public class Sync" Maintainer="auto" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit Sync extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>gnome-vfs-sharp</AssemblyName>
    <AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]</AssemblyPublicKey>
    <AssemblyVersion>2.20.0.0</AssemblyVersion>
    <AssemblyVersion>2.24.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <summary>File Operations; basic POSIX-style file operations.</summary>
    <remarks>
      <example>
        <code lang="C#">
using Gnome.Vfs;
using System;
using System.Text;

namespace Test.Gnome.Vfs {
	public class TestSync {
		static void Main (string[] args)
		{
			if (args.Length != 1) {
				Console.WriteLine ("Usage: TestSync &lt;uri&gt;");
				return;
			}
		
			Gnome.Vfs.Vfs.Initialize ();

			Gnome.Vfs.Uri uri = new Gnome.Vfs.Uri (args[0]);
			Handle handle = Sync.Open (uri, OpenMode.Read);

			UTF8Encoding utf8 = new UTF8Encoding ();
			byte[] buffer = new byte[1024];
			Result result = Result.Ok;			
			while (result == Result.Ok) {
				ulong bytesRead;
				result = Sync.Read (handle, out buffer[0],
						    (ulong)buffer.Length, out bytesRead);
				Console.WriteLine ("result read '{0}' = {1}", uri, result);
				if (bytesRead == 0)
					break;
				Console.WriteLine ("read ({0} bytes) : '{1}'",
						   bytesRead, utf8.GetString (buffer, 0, (int)bytesRead));
			}
			
			string test;
			result = Sync.FileControl (handle, "file:test", out test);
			Console.WriteLine ("result filecontrol '{0}' = {1}", uri, result);
			Console.WriteLine ("result file:test = {0}", test);
			
			result = Sync.Close (handle);
			Console.WriteLine ("result close '{0}' = {1}", uri, result);
			
			Gnome.Vfs.Vfs.Shutdown ();
		}
	}
}
  </code>
      </example>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName="Close">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Close (Gnome.Vfs.Handle handle);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Close(class Gnome.Vfs.Handle handle) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
      </Parameters>
      <Docs>
        <param name="handle">a <see cref="T:Gnome.Vfs.Handle" /></param>
        <summary>Close file associated with <see cref="T:Gnome.Vfs.Handle" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Create">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Handle Create (Gnome.Vfs.Uri uri, Gnome.Vfs.OpenMode mode, bool exclusive, Gnome.Vfs.FilePermissions perm);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Gnome.Vfs.Handle Create(class Gnome.Vfs.Uri uri, valuetype Gnome.Vfs.OpenMode mode, bool exclusive, valuetype Gnome.Vfs.FilePermissions perm) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Handle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="uri" Type="Gnome.Vfs.Uri" />
        <Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
        <Parameter Name="exclusive" Type="System.Boolean" />
        <Parameter Name="perm" Type="Gnome.Vfs.FilePermissions" />
      </Parameters>
      <Docs>
        <param name="uri">
          <see cref="T:Gnome.Vfs.Uri" /> for the file to create.</param>
        <param name="mode">
          <see cref="T:Gnome.Vfs.OpenMode" />.</param>
        <param name="exclusive">Whether the file should be created in "exclusive" mode: i.e. if this flag is true, the operation will fail if a file with the same name already exists.</param>
        <param name="perm">Bitmap representing the <see cref="T:Gnome.Vfs.FilePermissions" /> for the newly created file (Unix style).</param>
        <summary>Create <see cref="T:Gnome.Vfs.Uri" /> according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Handle" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Create">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Handle Create (string uri, Gnome.Vfs.OpenMode mode, bool exclusive, Gnome.Vfs.FilePermissions perm);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Gnome.Vfs.Handle Create(string uri, valuetype Gnome.Vfs.OpenMode mode, bool exclusive, valuetype Gnome.Vfs.FilePermissions perm) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Handle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="uri" Type="System.String" />
        <Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
        <Parameter Name="exclusive" Type="System.Boolean" />
        <Parameter Name="perm" Type="Gnome.Vfs.FilePermissions" />
      </Parameters>
      <Docs>
        <param name="uri">
          <see cref="T:System.String" /> representing the <see cref="T:Gnome.Vfs.Uri" /> to create.</param>
        <param name="mode">
          <see cref="T:Gnome.Vfs.OpenMode" />.</param>
        <param name="exclusive">Whether the file should be created in "exclusive" mode: i.e. if this flag is true, the operation will fail if a file with the same name already exists.</param>
        <param name="perm">Bitmap representing the <see cref="T:Gnome.Vfs.FilePermissions" /> for the newly created file (Unix style).</param>
        <summary>Create uri according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Handle" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="FileControl">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result FileControl (Gnome.Vfs.Handle handle, string operation, out string data);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result FileControl(class Gnome.Vfs.Handle handle, string operation, string data) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="operation" Type="System.String" />
        <Parameter Name="data" Type="System.String&amp;" RefType="out" />
      </Parameters>
      <Docs>
        <param name="handle">a <see cref="T:Gnome.Vfs.Handle" /> to the file to affect.</param>
        <param name="operation">operation to execute.</param>
        <param name="data">data needed to execute the operation.</param>
        <summary>Execute a backend dependent operation specified by the string operation.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>This is typically used for specialized vfs backends that need additional operations that gnome-vfs doesn't have. Compare it to the unix call ioctl(). The format of data depends on the operation. Operation that are backend specific are normally namespaced by their module name.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Open">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Handle Open (Gnome.Vfs.Uri uri, Gnome.Vfs.OpenMode mode);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Gnome.Vfs.Handle Open(class Gnome.Vfs.Uri uri, valuetype Gnome.Vfs.OpenMode mode) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Handle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="uri" Type="Gnome.Vfs.Uri" />
        <Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
      </Parameters>
      <Docs>
        <param name="uri">
          <see cref="T:Gnome.Vfs.Uri" /> to open.</param>
        <param name="mode">
          <see cref="T:Gnome.Vfs.OpenMode" />.</param>
        <summary>Open <see cref="T:Gnome.Vfs.Uri" /> according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Handle" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Open">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Handle Open (string uri, Gnome.Vfs.OpenMode mode);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class Gnome.Vfs.Handle Open(string uri, valuetype Gnome.Vfs.OpenMode mode) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Handle</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="uri" Type="System.String" />
        <Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
      </Parameters>
      <Docs>
        <param name="uri">
          <see cref="T:System.String" /> representing the <see cref="T:Gnome.Vfs.Uri" /> to open.</param>
        <param name="mode">
          <see cref="T:Gnome.Vfs.OpenMode" />.</param>
        <summary>Open uri according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Handle" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Read">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Read (Gnome.Vfs.Handle handle, out byte buffer, ulong bytes, out ulong bytes_read);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Read(class Gnome.Vfs.Handle handle, unsigned int8 buffer, unsigned int64 bytes, unsigned int64 bytes_read) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="buffer" Type="System.Byte&amp;" RefType="out" />
        <Parameter Name="bytes" Type="System.UInt64" />
        <Parameter Name="bytes_read" Type="System.UInt64&amp;" RefType="out" />
      </Parameters>
      <Docs>
        <param name="handle">
          <see cref="T:Gnome.Vfs.Handle" /> of the file to read data from.</param>
        <param name="buffer">
          <see cref="T:System.Byte" /> array that must be at least as large as the specified number of bytes to read. The array needs to be passed as "out buffer[0]".</param>
        <param name="bytes">The number of bytes to read.</param>
        <param name="bytes_read">The number of bytes actually read.</param>
        <summary>Read specified number of bytes from the uri <see cref="T:Gnome.Vfs.Handle" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>As with Unix system calls, the number of bytes read can effectively be less than the specified number of bytes on return and will be stored in bytes_read.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Seek">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Seek (Gnome.Vfs.Handle handle, Gnome.Vfs.SeekPosition whence, long offset);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Seek(class Gnome.Vfs.Handle handle, valuetype Gnome.Vfs.SeekPosition whence, int64 offset) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="whence" Type="Gnome.Vfs.SeekPosition" />
        <Parameter Name="offset" Type="System.Int64" />
      </Parameters>
      <Docs>
        <param name="handle">
          <see cref="T:Gnome.Vfs.Handle" /> for which the current position must be changed.</param>
        <param name="whence">
          <see cref="T:Gnome.Vfs.SeekPosition" /> value representing the starting position.</param>
        <param name="offset">number of bytes to skip from the position specified by <see cref="T:Gnome.Vfs.SeekPosition" /> (a positive value means to move forward; a negative one to move backwards).</param>
        <summary>Set the current position for reading/writing through <see cref="T:Gnome.Vfs.Handle" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Tell">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Tell (Gnome.Vfs.Handle handle, out ulong offset);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Tell(class Gnome.Vfs.Handle handle, unsigned int64 offset) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="offset" Type="System.UInt64&amp;" RefType="out" />
      </Parameters>
      <Docs>
        <param name="handle">
          <see cref="T:Gnome.Vfs.Handle" /> for which the current position must be retrieved.</param>
        <param name="offset">Contains the position on return.</param>
        <summary>Return the current position on <see cref="T:Gnome.Vfs.Handle" />. This is the point in the file pointed to by <see cref="T:Gnome.Vfs.Handle" /> that reads and writes will occur on.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Truncate">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Truncate (Gnome.Vfs.Handle handle, ulong length);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Truncate(class Gnome.Vfs.Handle handle, unsigned int64 length) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="length" Type="System.UInt64" />
      </Parameters>
      <Docs>
        <param name="handle">
          <see cref="T:Gnome.Vfs.Handle" /> to the file to be truncated.</param>
        <param name="length">length of the new file.</param>
        <summary>Truncate the file pointed at by <see cref="T:Gnome.Vfs.Handle" /> to the specified length. Data past the new length will be discarded.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Truncate">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Truncate (string uri, ulong length);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Truncate(string uri, unsigned int64 length) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="uri" Type="System.String" />
        <Parameter Name="length" Type="System.UInt64" />
      </Parameters>
      <Docs>
        <param name="uri">
          <see cref="T:System.String" /> representation of <see cref="T:Gnome.Vfs.Uri" />.</param>
        <param name="length">length of the new file.</param>
        <summary>Truncate the file represented by uri to the specified length. Data past the new length will be discarded.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Write">
      <MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Write (Gnome.Vfs.Handle handle, out byte buffer, ulong bytes, out ulong bytes_written);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype Gnome.Vfs.Result Write(class Gnome.Vfs.Handle handle, unsigned int8 buffer, unsigned int64 bytes, unsigned int64 bytes_written) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.24.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gnome.Vfs.Result</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="handle" Type="Gnome.Vfs.Handle" />
        <Parameter Name="buffer" Type="System.Byte&amp;" RefType="out" />
        <Parameter Name="bytes" Type="System.UInt64" />
        <Parameter Name="bytes_written" Type="System.UInt64&amp;" RefType="out" />
      </Parameters>
      <Docs>
        <param name="handle">
          <see cref="T:Gnome.Vfs.Handle" /> of the file to write data to.</param>
        <param name="buffer">
          <see cref="T:System.Byte" /> array containing the data to be written.</param>
        <param name="bytes">number of bytes to write.</param>
        <param name="bytes_written">number of bytes actually written.</param>
        <summary>Write number of bytes from buffer byte array into the file pointed to be <see cref="T:Gnome.Vfs.Handle" />.</summary>
        <returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
        <remarks>As with Unix system calls, the number of bytes written can effectively be less than the specified number or bytes on return and will be stored in bytes_written.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
