collect_app/src/main/java/org/odk/collect/android/application/Collect.java
public static boolean isODKTablesInstanceDataDirectory(File directory) {
        /*
         * Special check to prevent deletion of files that
         * could be in use by ODK Tables.
         */
        String dirPath = directory.getAbsolutePath();
        StoragePathProvider storagePathProvider = new StoragePathProvider();
        if (dirPath.startsWith(storagePathProvider.getDirPath(StorageSubdirectory.ODK))) {
            dirPath = dirPath.substring(storagePathProvider.getDirPath(StorageSubdirectory.ODK).length());
            String[] parts = dirPath.split(File.separatorChar == '\\' ? "\\\\" : File.separator);
            // [appName, instances, tableId, instanceId ]
            if (parts.length == 4 && parts[1].equals("instances")) {
                return true;
            }
        }
        return false;
    }
/**
     * Predicate that tests whether a directory path might refer to an
     * ODK Tables instance data directory (e.g., for media attachments).
     */
Predicate that tests whether a directory path might refer to an
ODK Tables instance data directory .
Predicate that tests whether a directory path might refer to an ODK Tables instance data directory .
public static boolean isODKTablesInstanceDataDirectory(File directory) {
        /*
         * Special check to prevent deletion of files that
         * could be in use by ODK Tables.
         */
        String dirPath = directory.getAbsolutePath();
        StoragePathProvider storagePathProvider = new StoragePathProvider();
        if (dirPath.startsWith(storagePathProvider.getDirPath(StorageSubdirectory.ODK))) {
            dirPath = dirPath.substring(storagePathProvider.getDirPath(StorageSubdirectory.ODK).length());
            String[] parts = dirPath.split(File.separatorChar == '\\' ? "\\\\" : File.separator);
            if (parts.length == 4 && parts[1].equals("instances")) {
                return true;
            }
        }
        return false;
    }
public static boolean isODKTablesInstanceDataDirectory ( File directory ) { /*
         * Special check to prevent deletion of files that
         * could be in use by ODK Tables.
         */ String dirPath = directory . getAbsolutePath ( ) ; StoragePathProvider storagePathProvider = new StoragePathProvider ( ) ; if ( dirPath . startsWith ( storagePathProvider . getDirPath ( StorageSubdirectory . ODK ) ) ) { dirPath = dirPath . substring ( storagePathProvider . getDirPath ( StorageSubdirectory . ODK ) . length ( ) ) ; String [ ] parts = dirPath . split ( File . separatorChar == '\\' ? "\\\\" : File . separator ) ; if ( parts . length == 4 && parts [ 1 ] . equals ( "instances" ) ) { return true ; } } return false ; }
Predicate that tests whether a directory path might refer to an
 ODK Tables instance data directory (e.g., for media attachments).
Predicate that tests whether a directory path might refer to an ODK Tables instance data directory ( e . g . for media attachments ) .
// [appName, instances, tableId, instanceId ]