GetDataDir
package io.appium.android.bootstrap.handler;
import android.os.Environment;
import io.appium.android.bootstrap.AndroidCommand;
import io.appium.android.bootstrap.AndroidCommandResult;
import io.appium.android.bootstrap.CommandHandler;
/**
* This handler is used to get the data dir.
*
*/
public class GetDataDir extends CommandHandler {
/*
* @param command The {@link AndroidCommand} used for this handler.
*
* @return {@link AndroidCommandResult}
*
* @throws JSONException
*
* @see io.appium.android.bootstrap.CommandHandler#execute(io.appium.android.
* bootstrap.AndroidCommand)
*/
@Override
public AndroidCommandResult execute(final AndroidCommand command) {
return getSucce***esult(Environment.getDataDirectory());
}
}
获取data的根目录。调用的是android的api:Environment.getDataDirectory()
转载于:https://blog.51cto.com/10988776/1726838