Package common.api

Examples of common.api.ApiClient.listDir()


    public static void dirs(String path) {
        checkAuthenticity();
        User u = Login.getUser();
        ApiClient client = ApiClientFactory.create(u);
        try {
          renderJSON(client.listDir(path, ApiClient.ListingType.DIRS));
        } catch (NotADirectoryException e) {
            Logger.error(e, "User attempt to list a directory which is infact a file: %s", u);
            renderJSON(Collections.emptyList());
        } catch (InvalidTokenException e) {
            Logger.error(e, "Invalid OAuth token for user %s", u);
View Full Code Here


     */
    public static List<FileMove> runRules(User user) {
        List<FileMove> fileMoves = Lists.newArrayList();
        ApiClient client = ApiClientFactory.create(user);
        try {
            Set<String> files = client.listDir(user.sortingFolder)

            if (files.isEmpty()) {
                Logger.info("Ran rules for %s, no files to process.", user);
                return fileMoves;
            }
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.