Java Code Examples for me.iwf.photopicker.utils.FileUtils

The following examples show how to use me.iwf.photopicker.utils.FileUtils. These examples are extracted from open source projects. 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 Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 5 votes vote down vote up
public void setPhotos(List<Photo> photos) {
  if (photos == null) return;
  for (int i = 0, j = 0, num = photos.size(); i < num; i++) {
      Photo p = photos.get(j);
      if (p == null || !FileUtils.fileIsExists(p.getPath())) {
          photos.remove(j);
      } else {
          j++;
      }
  }
  this.photos = photos;
}
 
Example 2
Source Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 5 votes vote down vote up
public void setPhotos(List<Photo> photos) {
  if (photos == null) return;
  for (int i = 0, j = 0, num = photos.size(); i < num; i++) {
      Photo p = photos.get(j);
      if (p == null || !FileUtils.fileIsExists(p.getPath())) {
          photos.remove(j);
      } else {
          j++;
      }
  }
  this.photos = photos;
}
 
Example 3
Source Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 5 votes vote down vote up
public void setPhotos(List<Photo> photos) {
  if (photos == null) return;
  for (int i = 0, j = 0, num = photos.size(); i < num; i++) {
      Photo p = photos.get(j);
      if (p == null || !FileUtils.fileIsExists(p.getPath())) {
          photos.remove(j);
      } else {
          j++;
      }
  }
  this.photos = photos;
}
 
Example 4
Source Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 4 votes vote down vote up
public void addPhoto(int id, String path) {
  if (FileUtils.fileIsExists(path)) {
    photos.add(new Photo(id, path));
  }
}
 
Example 5
Source Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 4 votes vote down vote up
public void addPhoto(int id, String path) {
  if (FileUtils.fileIsExists(path)) {
    photos.add(new Photo(id, path));
  }
}
 
Example 6
Source Project: PhotoPicker   Source File: PhotoDirectory.java    License: Apache License 2.0 4 votes vote down vote up
public void addPhoto(int id, String path) {
  if (FileUtils.fileIsExists(path)) {
    photos.add(new Photo(id, path));
  }
}