code: public static String[] list(final File file) {
          return AccessController.doPrivileged(new PrivilegedAction<String[]>() {
              @Override
              public String[] run() {
                  return file.list();
              }
          });
      }
docs: Java 2 security APIs for file.list()