All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.sardine.ant.command.CreateDirectory Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.github.sardine.ant.command;

import com.github.sardine.ant.Command;

/**
 * A nice ant wrapper around sardine.createDirectory().
 *
 * @author Jon Stevens
 */
public class CreateDirectory extends Command
{
	/** URL to create. */
	private String fUrl;

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void execute() throws Exception {
		log("creating directory " + fUrl);
		getSardine().createDirectory(fUrl);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void validateAttributes() throws Exception {
		if (fUrl == null)
			throw new IllegalArgumentException("url must not be null");
	}

	/** Set the URL to create. */
	public void setUrl(String url) {
		fUrl = url;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy