blob: 36d694d75052e4fe7bd695951a037c02f4953008 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Oak Ridge National Laboratory and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.remote.internal.proxy.server.commands;
import java.net.URI;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.remote.proxy.core.exceptions.ProxyException;
public class ServerMkdirCommand extends AbstractServerCommand {
private final int options;
private final URI uri;
public ServerMkdirCommand(int options, String path) {
this.options = options;
this.uri = URI.create("file:" + path);
}
public void exec() throws ProxyException {
try {
EFS.getStore(uri).mkdir(options, new NullProgressMonitor());
} catch (CoreException e) {
throw new ProxyException(e.getMessage());
}
}
}