Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix Workstation::fileRcopy
[simgrid.git] / src / surf / storage_n11.cpp
index c5395d6..5944409 100644 (file)
@@ -409,6 +409,7 @@ StorageActionPtr StorageN11::ls(const char* path)
 StorageActionPtr StorageN11::open(const char* mount, const char* path)
 {
   XBT_DEBUG("\tOpen file '%s'",path);
+
   sg_size_t size, *psize;
   psize = (sg_size_t*) xbt_dict_get_or_null(p_content, path);
   // if file does not exist create an empty file
@@ -429,6 +430,7 @@ StorageActionPtr StorageN11::open(const char* mount, const char* path)
 
   StorageActionPtr action = new StorageN11Action(getModel(), 0, getState() != SURF_RESOURCE_ON, this, OPEN);
   action->p_file = file;
+
   return action;
 }
 
@@ -482,21 +484,6 @@ StorageActionPtr StorageN11::write(surf_file_t fd, sg_size_t size)
   return action;
 }
 
-void StorageN11::rename(const char *src, const char *dest)
-{
-  sg_size_t *psize, *new_psize;
-  psize = (sg_size_t*) xbt_dict_get_or_null(p_content,src);
-  new_psize = xbt_new(sg_size_t, 1);
-  *new_psize = *psize;
-  if (psize){// src file exists
-    xbt_dict_remove(p_content, src);
-    xbt_dict_set(p_content, dest, new_psize,NULL);
-    XBT_DEBUG("Change file name from %s to %s, size '%llu'",src, dest, *psize);
-  }
-  else
-    XBT_DEBUG("File %s doesn't exist",src);
-}
-
 /**********
  * Action *
  **********/