public void swapDirectory(OCFile directory,FileDataStorageManager updatedStorageManager,boolean onlyOnDevice){
  if (updatedStorageManager != null && updatedStorageManager != mStorageManager) {
    mStorageManager=updatedStorageManager;
    mAccount=AccountUtils.getCurrentOwnCloudAccount(mContext);
  }
  if (mStorageManager != null) {
    mFiles=mStorageManager.getFolderContent(directory,onlyOnDevice);
    if (mJustFolders) {
      mFiles=getFolders(mFiles);
    }
    if (!mShowHiddenFiles) {
      mFiles=filterHiddenFiles(mFiles);
    }
  }
 else {
    mFiles=null;
  }
  mFiles=FileStorageUtils.sortOcFolder(mFiles);
  mFilesAll.clear();
  mFilesAll.addAll(mFiles);
  notifyDataSetChanged();
}

public void swapDirectory ( OCFile directory , FileDataStorageManager updatedStorageManager , boolean onlyOnDevice ) { if ( updatedStorageManager != null && updatedStorageManager != mStorageManager ) { mStorageManager = updatedStorageManager ; mAccount = AccountUtils . getCurrentOwnCloudAccount ( mContext ) ; } if ( mStorageManager != null ) { mFiles = mStorageManager . getFolderContent ( directory , onlyOnDevice ) ; if ( mJustFolders ) { mFiles = getFolders ( mFiles ) ; } if ( ! mShowHiddenFiles ) { mFiles = filterHiddenFiles ( mFiles ) ; } } else { mFiles = null ; } mFiles = FileStorageUtils . sortOcFolder ( mFiles ) ; mFilesAll . clear ( ) ; mFilesAll . addAll ( mFiles ) ; notifyDataSetChanged ( ) ; }
change the adapted directory for a new one
