package hh.dejsem.fm;

import hh.dejsem.net.SrvCmd;
import hh.lib.D;

/**
 * metody modifikace objektů file systému na serveru
 **/
public class FSServer {

	D d;

	public FSServer(D d) { this.d = d.klon(this); }

	void doCreateDir(String dirPath) throws Exception {
		SrvCmd.CREATEDIR.exec(d, dirPath);
	}

	void doRename(String from, String to) throws Exception {
		SrvCmd.MOVE.exec(d, new String[] {from, to});
	}

	void doMove(String from, String to) throws Exception {
		SrvCmd.MOVE.exec(d, new String[]{from, to});
	}

	void doDelete(String fp) throws Exception {
		SrvCmd.DELETE.exec(d, fp);
	}
}

