Java Code Examples for com.android.io.IAbstractFolder#listMembers()
The following examples show how to use
com.android.io.IAbstractFolder#listMembers() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourceRepository.java From java-n-IDE-for-Android with Apache License 2.0 | 5 votes |
/** * Ensures that the repository has been initialized again after a call to * {@link ResourceRepository#clear()} * * @return true if the repository was just re-initialized. */ public synchronized boolean ensureInitialized() { if (mCleared && !mInitializing) { ScanningContext context = new ScanningContext(this); mInitializing = true; IAbstractResource[] resources = mResourceFolder.listMembers(); for (IAbstractResource res : resources) { if (res instanceof IAbstractFolder) { IAbstractFolder folder = (IAbstractFolder)res; ResourceFolder resFolder = processFolder(folder); if (resFolder != null) { // now we process the content of the folder IAbstractResource[] files = folder.listMembers(); for (IAbstractResource fileRes : files) { if (fileRes instanceof IAbstractFile) { IAbstractFile file = (IAbstractFile)fileRes; resFolder.processFile(file, ResourceDeltaKind.ADDED, context); } } } } } mInitializing = false; mCleared = false; return true; } return false; }
Example 2
Source File: ResourceRepository.java From javaide with GNU General Public License v3.0 | 5 votes |
/** * Ensures that the repository has been initialized again after a call to * {@link ResourceRepository#clear()} * * @return true if the repository was just re-initialized. */ public synchronized boolean ensureInitialized() { if (mCleared && !mInitializing) { ScanningContext context = new ScanningContext(this); mInitializing = true; IAbstractResource[] resources = mResourceFolder.listMembers(); for (IAbstractResource res : resources) { if (res instanceof IAbstractFolder) { IAbstractFolder folder = (IAbstractFolder)res; ResourceFolder resFolder = processFolder(folder); if (resFolder != null) { // now we process the content of the folder IAbstractResource[] files = folder.listMembers(); for (IAbstractResource fileRes : files) { if (fileRes instanceof IAbstractFile) { IAbstractFile file = (IAbstractFile)fileRes; resFolder.processFile(file, ResourceDeltaKind.ADDED, context); } } } } } mInitializing = false; mCleared = false; return true; } return false; }
Example 3
Source File: ResourceRepository.java From NBANDROID-V2 with Apache License 2.0 | 5 votes |
/** * Ensures that the repository has been initialized again after a call to * {@link ResourceRepository#clear()}. * * @return true if the repository was just re-initialized. */ public synchronized boolean ensureInitialized() { if (mCleared && !mInitializing) { ScanningContext context = new ScanningContext(); mInitializing = true; IAbstractResource[] resources = mResourceFolder.listMembers(); for (IAbstractResource res : resources) { if (res instanceof IAbstractFolder) { IAbstractFolder folder = (IAbstractFolder)res; ResourceFolder resFolder = processFolder(folder); if (resFolder != null) { // now we process the content of the folder IAbstractResource[] files = folder.listMembers(); for (IAbstractResource fileRes : files) { if (fileRes instanceof IAbstractFile) { IAbstractFile file = (IAbstractFile)fileRes; resFolder.processFile(file, ResourceDeltaKind.ADDED, context); } } } } } mInitializing = false; mCleared = false; return true; } return false; }