Package javax.microedition.io.file

Examples of javax.microedition.io.file.FileConnection.list()


                    (FileConnection) Connector.open(folder, Connector.READ);

            if (f.exists() && f.isDirectory()) {

                final Enumeration filesList =
                        f.list("*" + Dictionary.FILE_EXTENSION, true);

                while (filesList.hasMoreElements()) {

                    final String s = (String) filesList.nextElement();

View Full Code Here


            FileConnection fc = null;

            // Open the file system and get the list of directories/files
            try {
                fc = (FileConnection) Connector.open(root);
                rootEnum = fc.list();
            } catch (final IOException e) {
                AttachmentDemo.errorDialog(e.toString());
                return;
            } finally {
                if (fc != null) {
View Full Code Here

            fc =
                    (FileConnection) Connector.open("file:///" + root,
                            Connector.READ);

            if (fc.isDirectory()) {
                final Enumeration e = fc.list();
                while (e.hasMoreElements()) {
                    final String inner = (String) e.nextElement();

                    if (isPictureFolder) {
                        _pictureFileNames.addElement(inner);
View Full Code Here

                // Search for files whose names end with ".mp3" and add them to
                // the playlist
                Enumeration enumeration;
                try {
                    enumeration = fcon.list();
                } catch (final Exception e) {
                    System.err.println("WARNING: unable to list files in "
                            + dirURL + ": " + e);
                    continue; // Skip this directory
                }
View Full Code Here

            // Open the file system and get the list of directories/files
            try {
                fc =
                        (FileConnection) Connector.open("file:///" + root,
                                Connector.READ);
                rootEnum = fc.list();
            } catch (final Exception ioex) {
                FileExplorerDemo.errorDialog(ioex.toString());
            } finally {

                if (fc != null) {
View Full Code Here

            Enumeration rootEnum = null;

            // Open the file system and get the list of directories/files
            try {
                fc = (FileConnection) Connector.open(root);
                rootEnum = fc.list();
            } catch (final IOException e) {
                SendMenuDemo.errorDialog(e.toString());
                return;
            } finally {
                if (fc != null) {
View Full Code Here

  protected void getFileList(String path) {
    try {
      // Opens a file connection in READ mode
      FileConnection fc = (FileConnection) Connector.open(path,
          Connector.READ);
      Enumeration filelist = fc.list("*", true); // also hidden files are
      String filename;
      while (filelist.hasMoreElements()) {
        filename = (String) filelist.nextElement();
        fc = (FileConnection) Connector.open(path + filename,
            Connector.READ);
View Full Code Here

  }
  protected void getFileList(String path) {
        try {
            //Opens a file connection in READ mode
            FileConnection fc = (FileConnection)Connector.open(path, Connector.READ);
            Enumeration filelist = fc.list("*", true); //also hidden files are shown
            String filename;
            while(filelist.hasMoreElements()) {
                filename = (String) filelist.nextElement();
                fc = (FileConnection)Connector.open(path + filename, Connector.READ);
                if(fc.isDirectory()) { //checks if fc is a directory
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.