gvfs r1481 - in trunk: . daemon



Author: otte
Date: Sun Mar  2 15:36:57 2008
New Revision: 1481
URL: http://svn.gnome.org/viewvc/gvfs?rev=1481&view=rev

Log:
2008-03-02  Benjamin Otte  <otte gnome org>

	* daemon/gvfsbackendftp.c: (do_make_directory),
	(g_vfs_backend_ftp_class_init):
	implement make_directory



Modified:
   trunk/ChangeLog
   trunk/daemon/gvfsbackendftp.c

Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c	(original)
+++ trunk/daemon/gvfsbackendftp.c	Sun Mar  2 15:36:57 2008
@@ -1863,6 +1863,28 @@
 }
 
 static void
+do_make_directory (GVfsBackend *backend,
+		   GVfsJobMakeDirectory *job,
+		   const char *filename)
+{
+  GVfsBackendFtp *ftp = G_VFS_BACKEND_FTP (backend);
+  FtpConnection *conn;
+  FtpFile *file;
+
+  conn = g_vfs_backend_ftp_pop_connection (ftp, G_VFS_JOB (job));
+  if (conn == NULL)
+    return;
+
+  file = ftp_filename_from_gvfs_path (conn, filename);
+  ftp_connection_send (conn,
+		       0,
+		       "MKD %s", file);
+  g_free (file);
+
+  g_vfs_backend_ftp_push_connection (ftp, conn);
+}
+
+static void
 g_vfs_backend_ftp_class_init (GVfsBackendFtpClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -1885,4 +1907,5 @@
   backend_class->enumerate = do_enumerate;
   backend_class->set_display_name = do_set_display_name;
   backend_class->delete = do_delete;
+  backend_class->make_directory = do_make_directory;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]