@Test public void testGetStorages() { List<String> storages = StorageManager.getResources(); assertNotNull(storages); assertEquals(storages.size(), 1); assertEquals(storages.get(0), mStorageName); }
public static List<String> getResources() { File resources = new File(STORAGE_PATH + File.separator + "/resources"); File[] children = resources.listFiles(); if (children == null) { return new ArrayList<String>(); } List<String> storages = new ArrayList<String>(); for (int i = 0; i < children.length; i++) { if (children[i].isDirectory()) storages.add(children[i].getName()); } return storages; }
StorageManager { public static List<String> getResources() { File resources = new File(STORAGE_PATH + File.separator + "/resources"); File[] children = resources.listFiles(); if (children == null) { return new ArrayList<String>(); } List<String> storages = new ArrayList<String>(); for (int i = 0; i < children.length; i++) { if (children[i].isDirectory()) storages.add(children[i].getName()); } return storages; } }
StorageManager { public static List<String> getResources() { File resources = new File(STORAGE_PATH + File.separator + "/resources"); File[] children = resources.listFiles(); if (children == null) { return new ArrayList<String>(); } List<String> storages = new ArrayList<String>(); for (int i = 0; i < children.length; i++) { if (children[i].isDirectory()) storages.add(children[i].getName()); } return storages; }  }
StorageManager { public static List<String> getResources() { File resources = new File(STORAGE_PATH + File.separator + "/resources"); File[] children = resources.listFiles(); if (children == null) { return new ArrayList<String>(); } List<String> storages = new ArrayList<String>(); for (int i = 0; i < children.length; i++) { if (children[i].isDirectory()) storages.add(children[i].getName()); } return storages; }  static boolean createResource(String name, AbstractModule module); static List<String> getResources(); static ISession getSession(String resourceName); static void removeResource(String pResourceName); }
StorageManager { public static List<String> getResources() { File resources = new File(STORAGE_PATH + File.separator + "/resources"); File[] children = resources.listFiles(); if (children == null) { return new ArrayList<String>(); } List<String> storages = new ArrayList<String>(); for (int i = 0; i < children.length; i++) { if (children[i].isDirectory()) storages.add(children[i].getName()); } return storages; }  static boolean createResource(String name, AbstractModule module); static List<String> getResources(); static ISession getSession(String resourceName); static void removeResource(String pResourceName); static final int BACKEND_INDEX_JCLOUDS; static final String ROOT_PATH; static final String STORAGE_PATH; }