mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 07:45:42 +00:00
f3b891e758
* gnomevfs/Directory.cs: s/uint/FilePermissions/. * gnomevfs/Gnomevfs.metadata: Make a bunch of API more user-friendly & C# like. * gnomevfs/Monitor.cs: Add internal MonitorEventType enum. * gnomevfs/Uri.custom: Move a bunch of API from Vfs.cs to Uri. * gnomevfs/Vfs.cs: Only put initialize & shutdown methods in here (plus some debug API). * gnomevfs/VfsStream.cs: Use new Uri API. * sample/gnomevfs/TestUnlink.cs: Fix sample. svn path=/trunk/gtk-sharp/; revision=38112
322 lines
16 KiB
XML
322 lines
16 KiB
XML
<Type Name="Sync" FullName="Gnome.Vfs.Sync">
|
|
<TypeSignature Language="C#" Value="public class Sync" Maintainer="auto" />
|
|
<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.0.0.0</AssemblyVersion>
|
|
<AssemblyCulture>neutral</AssemblyCulture>
|
|
<Attributes />
|
|
</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>
|
|
<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 <uri>");
|
|
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>
|
|
<Base>
|
|
<BaseTypeName>System.Object</BaseTypeName>
|
|
</Base>
|
|
<Interfaces />
|
|
<Attributes />
|
|
<Members>
|
|
<Member MemberName="Close">
|
|
<MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Close (Gnome.Vfs.Handle handle);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="handle" Type="Gnome.Vfs.Handle" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Close file associated with <see cref="T:Gnome.Vfs.Handle" />.</summary>
|
|
<param name="handle">a <see cref="T:Gnome.Vfs.Handle" /></param>
|
|
<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 (string uri, Gnome.Vfs.OpenMode mode, bool exclusive, Gnome.Vfs.FilePermissions perm);" />
|
|
<MemberType>Method</MemberType>
|
|
<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>
|
|
<summary>Create uri according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
|
|
<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>
|
|
<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 (Gnome.Vfs.Uri uri, Gnome.Vfs.OpenMode mode, bool exclusive, Gnome.Vfs.FilePermissions perm);" />
|
|
<MemberType>Method</MemberType>
|
|
<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>
|
|
<summary>Create <see cref="T:Gnome.Vfs.Uri" /> according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
|
|
<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>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Handle</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="uri" Type="System.String" />
|
|
<Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Open uri according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
|
|
<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>
|
|
<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 (Gnome.Vfs.Uri uri, Gnome.Vfs.OpenMode mode);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Handle</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
|
|
<Parameter Name="mode" Type="Gnome.Vfs.OpenMode" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Open <see cref="T:Gnome.Vfs.Uri" /> according to <see cref="T:Gnome.Vfs.OpenMode" />.</summary>
|
|
<param name="uri">
|
|
<see cref="T:Gnome.Vfs.Uri" /> to open.</param>
|
|
<param name="mode">
|
|
<see cref="T:Gnome.Vfs.OpenMode" />.</param>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="handle" Type="Gnome.Vfs.Handle" />
|
|
<Parameter Name="buffer" Type="System.Byte&" RefType="out" />
|
|
<Parameter Name="bytes" Type="System.UInt64" />
|
|
<Parameter Name="bytes_read" Type="System.UInt64&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Read specified number of bytes from the uri <see cref="T:Gnome.Vfs.Handle" />.</summary>
|
|
<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>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<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>
|
|
<summary>Set the current position for reading/writing through <see cref="T:Gnome.Vfs.Handle" />.</summary>
|
|
<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>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="handle" Type="Gnome.Vfs.Handle" />
|
|
<Parameter Name="buffer" Type="System.Byte&" RefType="out" />
|
|
<Parameter Name="bytes" Type="System.UInt64" />
|
|
<Parameter Name="bytes_written" Type="System.UInt64&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Write number of bytes from buffer byte array into the file pointed to be <see cref="T:Gnome.Vfs.Handle" />.</summary>
|
|
<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>
|
|
<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>
|
|
<Member MemberName="Tell">
|
|
<MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Tell (Gnome.Vfs.Handle handle, out ulong offset);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="handle" Type="Gnome.Vfs.Handle" />
|
|
<Parameter Name="offset" Type="System.UInt64&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<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>
|
|
<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>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="uri" Type="System.String" />
|
|
<Parameter Name="length" Type="System.UInt64" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Truncate the file represented by uri to the specified length. Data past the new length will be discarded.</summary>
|
|
<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>
|
|
<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);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gnome.Vfs.Result</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="handle" Type="Gnome.Vfs.Handle" />
|
|
<Parameter Name="length" Type="System.UInt64" />
|
|
</Parameters>
|
|
<Docs>
|
|
<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>
|
|
<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>
|
|
<returns>a <see cref="T:Gnome.Vfs.Result" /></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);" />
|
|
<MemberType>Method</MemberType>
|
|
<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&" RefType="out" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Execute a backend dependent operation specified by the string operation.</summary>
|
|
<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>
|
|
<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>
|
|
</Members>
|
|
</Type> |