Package com.google.api.services.drive.model

Examples of com.google.api.services.drive.model.File


    return new GDirectoryFolder(exec, file);
  }

  @Override
  public GDirectory chdir(String directoryId) {
    File file = exec.directoryOf(directoryId);
    return new GDirectoryFolder(exec, file);
  }
View Full Code Here


    changes = "0B1fV80wEwsDzeE9oVjJvSjItMUk";
    trashable = "1KoR4Fjd8T2JwVIKY2Mp1cRHJtn2tPWjHKLzdRfEyVWE";
  }

  public void directory_of() {
    File res = exec.directoryOf(root);

    assertThat(res, notNullValue());
    assertThat(res.getId(), equalTo(root));
    assertThat(res.isEmpty(), is(false));
  }
View Full Code Here

    assertThat(names.get(0), equalTo("world"));
    assertThat(names.get(1), equalTo("hello"));
  }

  public void mkdir() {
    File res = exec.mkdir(root, "temp0");
    assertThat(res.getTitle(), equalTo("temp0"));
    trash(res);
  }
View Full Code Here

    java.io.File file = new java.io.File(title);
    Files.write("write", file, Charsets.UTF_8);
    From from = From.of(file);
    MimeType mimeType = MimeType.TEXT_PLAIN;

    File res = exec.write(folder, from, title, mimeType);
    assertThat(res.getTitle(), equalTo("write"));
    file.delete();
    trash(res);
  }
View Full Code Here

    String title = "void.xls";
    java.io.File file = IOUtils.openXlsFile(getClass(), title);
    From from = From.of(file);
    MimeType mimeType = MimeType.APPLICATION_MS_EXCEL;

    File res = exec.write(folder, from, title, mimeType);
    assertThat(res.getTitle(), equalTo(title));
    trash(res);
  }
View Full Code Here

    String title = "void.xls";
    InputStream stream = IOUtils.open(getClass(), title);
    From from = From.of(stream);
    MimeType mimeType = MimeType.APPLICATION_MS_EXCEL;

    File res = exec.write(folder, from, title, mimeType);
    assertThat(res.getTitle(), equalTo(title));
    trash(res);
  }
View Full Code Here

    String title = "void.xlsx";
    InputStream stream = IOUtils.open(getClass(), title);
    From from = From.of(stream);
    MimeType mimeType = MimeType.APPLICATION_OPENXML_SHEET;

    File res = exec.write(folder, from, title, mimeType);
    assertThat(res.getTitle(), equalTo(title));
    trash(res);
  }
View Full Code Here

    assertThat(res.getTitle(), equalTo(title));
    trash(res);
  }

  public void trash() {
    File trash = exec.trash(trashable);
    Labels res = trash.getLabels();

    assertThat(res.getTrashed(), is(true));
  }
View Full Code Here

    assertThat(res.getTrashed(), is(true));
  }

  @Test(dependsOnMethods = { "trash" })
  public void untrash() {
    File untrash = exec.untrash(trashable);
    Labels res = untrash.getLabels();

    assertThat(res.getTrashed(), is(false));
  }
View Full Code Here

    private static final Logger LOG = LoggerFactory.getLogger(DrivePermissionsIntegrationTest.class);
    private static final String PATH_PREFIX = GoogleDriveApiCollection.getCollection().getApiName(DrivePermissionsApiMethod.class).getName();
   
    @Test
    public void testList() throws Exception {
        File testFile = uploadTestFile();
        String fileId = testFile.getId();
       
        // using String message body for single parameter "fileId"
        final com.google.api.services.drive.model.PermissionList result = requestBody("direct://LIST", fileId);

        assertNotNull("list result", result);
View Full Code Here

TOP

Related Classes of com.google.api.services.drive.model.File

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.