package com.asuscomm.ftptest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import org.apache.commons.net.ftp.FTPFile;
import java.io.IOException;

public class MainActivity extends AppCompatActivity {
    MahalFtp ftp;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ftp = new MahalFtp("網址或ip", 21, "帳號", "密碼");
        new Thread(()->{
            FTPFile []files=null;
            files = ftp.listDir("/disk_e");
            if(files!=null) {
                for (FTPFile file : files) {
                    Log.d("Thomas", file.getName());
                }
            }
        }).start();
    }
}
