public class FTPUtils
extends java.lang.Object
构造器和说明 |
---|
FTPUtils() |
限定符和类型 | 方法和说明 |
---|---|
static void |
appendWrite(FineFTP ftpClient,
java.lang.String file,
java.io.InputStream data)
追加写入
|
static boolean |
create(FineFTP ftpClient,
java.lang.String path)
创建文件
|
static boolean |
createDirectory(FineFTP ftpClient,
java.lang.String dir)
创建文件夹
|
static boolean |
delete(FineFTP ftpClient,
java.lang.String path)
删除文件或者文件夹
|
static boolean |
exist(FineFTP ftpClient,
java.lang.String path)
是否存在
|
static FineFileEntry |
getEntry(FineFTP ftpClient,
java.lang.String path) |
static long |
getLength(FineFTP ftpClient,
java.lang.String path) |
static long |
getModificationTime(FineFTP ftpClient,
java.lang.String path) |
static boolean |
isDirectory(FineFTP ftpClient,
java.lang.String path)
是否是文件夹
|
static java.lang.String[] |
list(FineFTP ftpClient,
java.lang.String dir,
Filter<java.lang.String> filter)
list
|
static java.lang.String[] |
list(FineFTP ftpClient,
java.lang.String dir,
Filter<java.lang.String> filter,
boolean fullPath)
list
|
static FineFileEntry[] |
lsEntries(FineFTP ftp,
java.lang.String dir) |
static java.io.InputStream |
read(FineFTP ftpClient,
java.lang.String file)
读取
|
static boolean |
rename(FineFTP ftpClient,
java.lang.String path,
java.lang.String newPath)
重命名
|
static void |
write(FineFTP ftpClient,
java.lang.String file,
java.io.InputStream data)
写入
|
public static java.io.InputStream read(FineFTP ftpClient, java.lang.String file) throws ResourceIOException
ftpClient
- clientfile
- 文件路径ResourceIOException
public static java.lang.String[] list(FineFTP ftpClient, java.lang.String dir, Filter<java.lang.String> filter)
ftpClient
- dir
- filter
- 过滤public static FineFileEntry getEntry(FineFTP ftpClient, java.lang.String path)
public static FineFileEntry[] lsEntries(FineFTP ftp, java.lang.String dir)
public static java.lang.String[] list(FineFTP ftpClient, java.lang.String dir, Filter<java.lang.String> filter, boolean fullPath)
ftpClient
- dir
- filter
- fullPath
- 是否完整路径public static boolean exist(FineFTP ftpClient, java.lang.String path)
ftpClient
- path
- public static boolean rename(FineFTP ftpClient, java.lang.String path, java.lang.String newPath) throws ResourceIOException
ftpClient
- path
- newPath
- ResourceIOException
public static boolean createDirectory(FineFTP ftpClient, java.lang.String dir)
ftpClient
- dir
- public static boolean isDirectory(FineFTP ftpClient, java.lang.String path)
ftpClient
- path
- public static boolean delete(FineFTP ftpClient, java.lang.String path)
ftpClient
- path
- public static long getModificationTime(FineFTP ftpClient, java.lang.String path)
public static long getLength(FineFTP ftpClient, java.lang.String path)
public static boolean create(FineFTP ftpClient, java.lang.String path) throws ResourceIOException
ftpClient
- path
- ResourceIOException
public static void write(FineFTP ftpClient, java.lang.String file, java.io.InputStream data) throws ResourceIOException
ftpClient
- file
- data
- ResourceIOException
public static void appendWrite(FineFTP ftpClient, java.lang.String file, java.io.InputStream data) throws ResourceIOException
ftpClient
- file
- data
- ResourceIOException