Package com.gwtmobile.phonegap.client.FileMgr

Examples of com.gwtmobile.phonegap.client.FileMgr.EntryCallback


    private void moveTo() {
      getDemoDirectory(new DemoCallback() {
      @Override
      public void onSuccess(final DirectoryEntry dir) {
        dir.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            DirectoryEntry parent = (DirectoryEntry) entry;
            dir.moveTo(parent, "backup-gwtmobile-phonegap", new EntryCallback() {
              @Override
              public void onSuccess(Entry entry) {
                console("succeed: moved to --" + entry.getFullPath());
              }             
              @Override
View Full Code Here


    private void copyTo() {
      getDemoDirectory(new DemoCallback() {
      @Override
      public void onSuccess(final DirectoryEntry dir) {
        dir.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            DirectoryEntry parent = (DirectoryEntry) entry;
            dir.copyTo(parent, "backup-gwtmobile-phonegap", new EntryCallback() {
              @Override
              public void onSuccess(Entry entry) {
                console("succeed: copied to --" + entry.getFullPath());
              }             
              @Override
View Full Code Here

    private void getDirParent() {
      getDemoDirectory(new DemoCallback() {
      @Override
      public void onSuccess(final DirectoryEntry dir) {
        dir.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            console("succeed: parent --" + entry.getFullPath());
          }
          @Override
View Full Code Here

    private void getFile() {
      getDemoDirectory(new DemoCallback() {
      @Override
      public void onSuccess(final DirectoryEntry dir) {
        dir.getFile("kitchensink.txt", new FileOptions().create(true), new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            console("success: get file --" + entry.getFullPath());
          }
          @Override
View Full Code Here

    }
    private void getDemoDirectory(final String dirName, final DemoCallback callback) {
      FileMgr.requestFileSystem(LocalFileSystem.PERSISTENT, new FileSystemCallback() {
      @Override
      public void onSuccess(FileSystem fs) {
        fs.getRoot().getDirectory(dirName, new FileOptions().create(true), new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            DirectoryEntry dir = (DirectoryEntry) entry;
            callback.onSuccess(dir);
          }
View Full Code Here

    private void moveTo() {
      getDemoFile(new DemoCallback() {
      @Override
      public void onSuccess(final FileEntry file) {
        file.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            file.moveTo(entry, "backup-kitchensink.txt", new EntryCallback() {
              @Override
              public void onSuccess(Entry entry) {
                console("success: move to -- " + entry.getFullPath());
              }
              @Override
View Full Code Here

    private void copyTo() {
      getDemoFile(new DemoCallback() {
      @Override
      public void onSuccess(final FileEntry file) {
        file.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            file.copyTo(entry, "backup-kitchensink.txt", new EntryCallback() {
              @Override
              public void onSuccess(Entry entry) {
                console("success: copy to -- " + entry.getFullPath());
              }
              @Override
View Full Code Here

    private void getFileParent() {
      getDemoFile(new DemoCallback() {
      @Override
      public void onSuccess(final FileEntry file) {
        file.getParent(new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            console("success: get parent -- " + entry.getFullPath());
          }
          @Override
View Full Code Here

 
    private void getDemoFile(final String fileName, final DemoCallback callback) {
      FileMgr.requestFileSystem(LocalFileSystem.PERSISTENT, new FileSystemCallback() {
      @Override
      public void onSuccess(FileSystem fs) {
        fs.getRoot().getDirectory("gwtmobile-phonegap", new FileOptions().create(true), new EntryCallback() {
          @Override
          public void onSuccess(Entry entry) {
            DirectoryEntry dir = (DirectoryEntry) entry;
            dir.getFile(fileName, new FileOptions().create(true), new EntryCallback() {
              @Override
              public void onSuccess(Entry entry) {
                FileEntry file = (FileEntry) entry;
                callback.onSuccess(file);
              }
View Full Code Here

TOP

Related Classes of com.gwtmobile.phonegap.client.FileMgr.EntryCallback

Copyright © 2018 www.massapicom. 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.