public static void setTimes()

in src/main/java/com/microsoft/azure/datalake/store/Core.java [1022:1049]


    public static void setTimes(String path,
                                long atime,
                                long mtime,
                                ADLStoreClient client,
                                RequestOptions opts,
                                OperationResponse resp) {
        if (atime < -1) {
            resp.message = "Invalid Access Time specified";
            resp.successful = false;
            return;
        }

        if (mtime < -1) {
            resp.message = "Invalid Modification Time specified";
            resp.successful = false;
            return;
        }

        if (atime == -1 && mtime == -1) {
            resp.message = "Access time and Modification time cannot both be unspecified";
        }

        QueryParams qp = new QueryParams();
        if (mtime != -1 ) qp.add("modificationtime", Long.toString(mtime));
        if (atime != -1 ) qp.add("accesstime",       Long.toString(atime));

        HttpTransport.makeCall(client, Operation.SETTIMES, path, qp, null, 0, 0, opts, resp);
    }