title: Check if a folder exists of a certain name in Firebase storage
body: <p>In the Firebase Storage, I have a folder named <code>uploads/</code>. Inside that folder, I have multiple folders named after the <code>userId</code>s of the registered users. </p>
  
  <p>This is what I'm trying to do. When the user enters the 'ProfileActivity', the code looks in the Firebase Database if there is any folder named after the userId of that user under the uploads/ folder. And then runs code accordingly if the folder exists or not.</p>
  
  <p>This is what I have done so far, but here the <code>addValueEventListener</code> is not resolved. Am I doing it the right way? What I'm missing here?</p>
  
  <pre><code>public class ProfileActivity extends AppCompatActivity {
  
      private FirebaseAuth mAuth;
      private StorageReference mStorageRef;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_profile);
  
          mAuth = FirebaseAuth.getInstance();
          mStorageRef = FirebaseStorage.getInstance().getReference("uploads");
      }
  
  
      @Override
      protected void onStart() {
          super.onStart();
          FirebaseUser user = mAuth.getCurrentUser();
          String userID = user.getUid();
          if (user.isEmailVerified()) {
              StorageReference userFolder = mStorageRef.child(userID);
              userFolder.addValueEventListener(new ValueEventListener() {
                  @Override
                  void onDataChange(DataSnapshot snapshot) {
                      if (snapshot.exists()) {
                          // run some code
                      } else {
                          //Code
                      }
                  }
              });
  
          }
      }
  }
  </code></pre>