Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

public class Main {
    public static boolean isNoMediaDir(File dir) {
        boolean result = false;
        if (dir == null || dir.isFile()) {
            result = true;
        } else {
            File[] files = dir.listFiles();
            if (files != null) {
                for (File childFile : files) {
                    if (childFile.isFile() && ".nomedia".equals(childFile.getName())) {
                        result = true;
                        break;
                    }
                }
            }
        }
        return result;
    }
}