예제 #1
0
    private void ShowFileInfo()
    {
        // Ask for a file
        Gnome.Vfs.Uri uri = FileDialog.OpenFile("Show File Info");
        Console.WriteLine("Selected uri\t= {0}", uri.ToString());

        // MimeType
        string mimeType = Gnome.Vfs.MimeType.GetMimeTypeForUri(uri.ToString());

        Console.WriteLine("Mimetype\t= {0}", mimeType);

        // IsLocal
        Gnome.Vfs.FileInfoOptions options = Gnome.Vfs.FileInfoOptions.Default;
        Gnome.Vfs.FileInfo        info    = new Gnome.Vfs.FileInfo(uri.ToString(), options);

        Console.WriteLine("IsLocal\t\t= {0}", info.IsLocal);
    }
예제 #2
0
        public static Gnome.Vfs.Result GetFileInfo(string text_uri, Gnome.Vfs.FileInfo info, Gnome.Vfs.FileInfoOptions options)
        {
            IntPtr native_text_uri = GLib.Marshaller.StringToPtrGStrdup(text_uri);
            int    raw_ret         = gnome_vfs_get_file_info(native_text_uri, info == null ? IntPtr.Zero : info.Handle, (int)options);

            Gnome.Vfs.Result ret = (Gnome.Vfs.Result)raw_ret;
            GLib.Marshaller.Free(native_text_uri);
            return(ret);
        }
예제 #3
0
        public static Gnome.Vfs.Result GetFileInfoFromHandle(Gnome.Vfs.Handle handle, Gnome.Vfs.FileInfo info, Gnome.Vfs.FileInfoOptions options)
        {
            int raw_ret = gnome_vfs_get_file_info_from_handle(handle == null ? IntPtr.Zero : handle.Handle, info == null ? IntPtr.Zero : info.Handle, (int)options);

            Gnome.Vfs.Result ret = (Gnome.Vfs.Result)raw_ret;
            return(ret);
        }
예제 #4
0
        public static Gnome.Vfs.Result GetFileInfoUriCancellable(Gnome.Vfs.Uri uri, Gnome.Vfs.FileInfo info, Gnome.Vfs.FileInfoOptions options, Gnome.Vfs.Context context)
        {
            int raw_ret = gnome_vfs_get_file_info_uri_cancellable(uri == null ? IntPtr.Zero : uri.Handle, info == null ? IntPtr.Zero : info.Handle, (int)options, context == null ? IntPtr.Zero : context.Handle);

            Gnome.Vfs.Result ret = (Gnome.Vfs.Result)raw_ret;
            return(ret);
        }
예제 #5
0
        public static Gnome.Vfs.Result GetFileInfoUri(Gnome.Vfs.Uri uri, Gnome.Vfs.FileInfo info, Gnome.Vfs.FileInfoOptions options)
        {
            int raw_ret = gnome_vfs_get_file_info_uri(uri == null ? IntPtr.Zero : uri.Handle, info == null ? IntPtr.Zero : info.Handle, (int)options);

            Gnome.Vfs.Result ret = (Gnome.Vfs.Result)raw_ret;
            return(ret);
        }