Esempio n. 1
0
  private static void setFlag(final int id, final int mask, final boolean value) {
    int oldFlags = FSRecords.getFlags(id);
    int flags = value ? oldFlags | mask : oldFlags & ~mask;

    if (oldFlags != flags) {
      FSRecords.setFlags(id, flags, true);
    }
  }
Esempio n. 2
0
 @Override
 public int getFileAttributes(int id) {
   assert id > 0;
   //noinspection MagicConstant
   return FSRecords.getFlags(id);
 }
Esempio n. 3
0
 private static boolean areChildrenLoaded(final int parentId) {
   return (FSRecords.getFlags(parentId) & CHILDREN_CACHED_FLAG) != 0;
 }
Esempio n. 4
0
 public static void setChildrenCached(int id) {
   int flags = FSRecords.getFlags(id);
   FSRecords.setFlags(id, flags | CHILDREN_CACHED_FLAG, true);
 }
Esempio n. 5
0
 private static boolean checkFlag(int fileId, int mask) {
   return (FSRecords.getFlags(fileId) & mask) != 0;
 }