GtkSharp/doc/en/Gnome.Vfs/Directory.xml

271 lines
13 KiB
XML
Raw Normal View History

<Type Name="Directory" FullName="Gnome.Vfs.Directory">
<TypeSignature Language="C#" Value="public class Directory" 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>Basic directory operations: creating, reading and removing directories.</summary>
<remarks>
<example>
<code lang="C#">
using GLib;
using Gnome.Vfs;
using System;
using System.Text;
namespace Test.Gnome.Vfs {
public class TestInfo {
private static MainLoop loop;
static void Main (string[] args)
{
if (args.Length != 1) {
Console.WriteLine ("Usage: TestDirectory &lt;uri&gt;");
return;
}
Gnome.Vfs.Vfs.Initialize ();
FileInfo[] entries = Gnome.Vfs.Directory.GetEntries (args[0]);
Console.WriteLine ("Directory {0} contains {1} entries:", args[0], entries.Length);
foreach (FileInfo info in entries) {
Console.WriteLine (info.Name);
}
Gnome.Vfs.Directory.GetEntries (args[0], FileInfoOptions.Default,
20, (int)Gnome.Vfs.Async.Priority.Default,
new AsyncDirectoryLoadCallback (OnDirectoryLoad));
loop = new MainLoop ();
loop.Run ();
Gnome.Vfs.Vfs.Shutdown ();
}
private static void OnDirectoryLoad (Result result, FileInfo[] entries, uint entries_read)
{
Console.WriteLine ("DirectoryLoad: {0}", result);
if (result != Result.Ok &amp;&amp; result != Result.ErrorEof) {
loop.Quit ();
return;
}
Console.WriteLine ("read {0} entries", entries_read);
foreach (FileInfo info in entries) {
Console.WriteLine (info.Name);
}
if (result == Result.ErrorEof)
loop.Quit ();
}
}
}
</code>
</example>
</remarks>
</Docs>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes />
<Members>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.FileInfo[] GetEntries (Gnome.Vfs.Uri uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.FileInfo[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
</Parameters>
<Docs>
<summary>Load a directory from <see cref="T:Gnome.Vfs.Uri" />.</summary>
<param name="uri">a <see cref="T:Gnome.Vfs.Uri" /></param>
<returns>a <see cref="T:Gnome.Vfs.FileInfo[]" /> containing the files in the directory.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.FileInfo[] GetEntries (Gnome.Vfs.Uri uri, Gnome.Vfs.FileInfoOptions options);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.FileInfo[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
<Parameter Name="options" Type="Gnome.Vfs.FileInfoOptions" />
</Parameters>
<Docs>
<summary>Load a directory from <see cref="T:Gnome.Vfs.Uri" /> with the specified <see cref="T:Gnome.Vfs.FileInfoOptions" />.</summary>
<param name="uri">a <see cref="T:Gnome.Vfs.Uri" /></param>
<param name="options">
<see cref="T:Gnome.Vfs.FileInfoOptions" /> for loading the directory.</param>
<returns>a <see cref="T:Gnome.Vfs.FileInfo[]" /> containing the files in the directory.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.FileInfo[] GetEntries (string text_uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.FileInfo[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text_uri" Type="System.String" />
</Parameters>
<Docs>
<summary>Load a directory from uri.</summary>
<param name="text_uri">
<see cref="T:System.String" /> representing the URI of the directory to be loaded.</param>
<returns>a <see cref="T:Gnome.Vfs.FileInfo[]" /> containing the files in the directory.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.FileInfo[] GetEntries (string text_uri, Gnome.Vfs.FileInfoOptions options);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.FileInfo[]</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="text_uri" Type="System.String" />
<Parameter Name="options" Type="Gnome.Vfs.FileInfoOptions" />
</Parameters>
<Docs>
<summary>Load a directory from uri with the specified <see cref="T:Gnome.Vfs.FileInfoOptions" />.</summary>
<param name="text_uri">
<see cref="T:System.String" /> representing the URI of the directory to be loaded.</param>
<param name="options">
<see cref="T:Gnome.Vfs.FileInfoOptions" /> for loading the directory.</param>
<returns>a <see cref="T:Gnome.Vfs.FileInfo[]" /> containing the files in the directory.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static void GetEntries (Gnome.Vfs.Uri uri, Gnome.Vfs.FileInfoOptions options, uint itemsPerNotification, int priority, Gnome.Vfs.AsyncDirectoryLoadCallback callback);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
<Parameter Name="options" Type="Gnome.Vfs.FileInfoOptions" />
<Parameter Name="itemsPerNotification" Type="System.UInt32" />
<Parameter Name="priority" Type="System.Int32" />
<Parameter Name="callback" Type="Gnome.Vfs.AsyncDirectoryLoadCallback" />
</Parameters>
<Docs>
<summary>Asynchronously load a directory from <see cref="T:Gnome.Vfs.Uri" /> with the specified <see cref="T:Gnome.Vfs.FileInfoOptions" />.</summary>
<param name="uri">a <see cref="T:Gnome.Vfs.Uri" /></param>
<param name="options">
<see cref="T:Gnome.Vfs.FileInfoOptions" /> for loading the directory.</param>
<param name="itemsPerNotification">the number of entries to read in the directory per <see cref="T:Gnome.Vfs.AsyncDirectoryLoadCallback" /> notification.</param>
<param name="priority">a value from <see cref="M:Gnome.Vfs.Async+Priority.Min" /> to <see cref="T:Gnome.Vfs.Async+Priority.Max" /> (normally should be <see cref="T:Gnome.Vfs.Async+Priority.Default" />) indicating the priority to assign this job in allocating threads from the thread pool.</param>
<param name="callback">a <see cref="T:Gnome.Vfs.AsyncDirectoryLoadCallback" /> to be called when the specified number of entries have been read or the operation is complete.</param>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="GetEntries">
<MemberSignature Language="C#" Value="public static void GetEntries (string uri, Gnome.Vfs.FileInfoOptions options, uint itemsPerNotification, int priority, Gnome.Vfs.AsyncDirectoryLoadCallback callback);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
<Parameter Name="options" Type="Gnome.Vfs.FileInfoOptions" />
<Parameter Name="itemsPerNotification" Type="System.UInt32" />
<Parameter Name="priority" Type="System.Int32" />
<Parameter Name="callback" Type="Gnome.Vfs.AsyncDirectoryLoadCallback" />
</Parameters>
<Docs>
<summary>Asynchronously load a directory from uri with the specified <see cref="T:Gnome.Vfs.FileInfoOptions" />.</summary>
<param name="uri">
<see cref="T:System.String" /> representing the URI of the directory to be loaded.</param>
<param name="options">
<see cref="T:Gnome.Vfs.FileInfoOptions" /> for loading the directory.</param>
<param name="itemsPerNotification">the number of entries to read in the directory per <see cref="T:Gnome.Vfs.AsyncDirectoryLoadCallback" /> notification.</param>
<param name="priority">a value from <see cref="M:Gnome.Vfs.Async+Priority.Min" /> to <see cref="T:Gnome.Vfs.Async+Priority.Max" /> (normally should be <see cref="T:Gnome.Vfs.Async+Priority.Default" />) indicating the priority to assign this job in allocating threads from the thread pool.</param>
<param name="callback">a <see cref="T:Gnome.Vfs.AsyncDirectoryLoadCallback" /> to be called when the specified number of entries have been read or the operation is complete.</param>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="Delete">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Delete (Gnome.Vfs.Uri uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.Result</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
</Parameters>
<Docs>
<summary>Delete <see cref="T:Gnome.Vfs.Uri" />. <see cref="T:Gnome.Vfs.Uri" /> must be an empty directory.</summary>
<param name="uri">
<see cref="T:Gnome.Vfs.Uri" /> of the directory to be removed.</param>
<returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
<Member MemberName="Delete">
<MemberSignature Language="C#" Value="public static Gnome.Vfs.Result Delete (string uri);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.Result</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
</Parameters>
<Docs>
<summary>Remove uri. Uri must be an empty directory.</summary>
<param name="uri">URI of the directory to be removed.</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.Result Create (Gnome.Vfs.Uri uri, Gnome.Vfs.FilePermissions perm);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.Result</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="Gnome.Vfs.Uri" />
<Parameter Name="perm" Type="Gnome.Vfs.FilePermissions" />
</Parameters>
<Docs>
<summary>Create a directory at <see cref="T:Gnome.Vfs.Uri" />. Only succeeds if a file or directory does not already exist at <see cref="T:Gnome.Vfs.Uri" />.</summary>
<param name="uri">
<see cref="T:Gnome.Vfs.Uri" /> of the directory to be created.</param>
<param name="perm">Unix-style permissions for the newly created directory.</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.Result Create (string uri, Gnome.Vfs.FilePermissions perm);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Gnome.Vfs.Result</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="uri" Type="System.String" />
<Parameter Name="perm" Type="Gnome.Vfs.FilePermissions" />
</Parameters>
<Docs>
<summary>Create a directory at uri. Only succeeds if a file or directory does not already exist at the uri.</summary>
<param name="uri">URI of the directory to be created.</param>
<param name="perm">Unix-style permissions for the newly created directory.</param>
<returns>a <see cref="T:Gnome.Vfs.Result" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
</Members>
</Type>