public class LocalFileSystem extends Object implements BaseFileSystem
| 限定符和类型 | 字段和说明 |
|---|---|
org.apache.hadoop.fs.FileSystem |
fileSystem |
| 构造器和说明 |
|---|
LocalFileSystem() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
create(String path) |
void |
deleteFile(String file)
删除文件
|
List<FileInfo> |
getDirFiles(String file)
查看目录下文件
|
FileInfo |
getFiles(String file)
查看当前文件信息
|
InputStream |
getInputStream(String file)
获取输入流
|
OutputStream |
getOutputStream(String file)
获取输入流
|
boolean |
isFileExist(String hdfsPath)
文件是否存在
|
void |
mkdirs(String path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdownloadFile, uploadFilepublic void deleteFile(String file) throws IOException
BaseFileSystemdeleteFile 在接口中 BaseFileSystemIOExceptionpublic void mkdirs(String path) throws IOException
mkdirs 在接口中 BaseFileSystemIOExceptionpublic void create(String path) throws IOException
create 在接口中 BaseFileSystemIOExceptionpublic InputStream getInputStream(String file) throws IOException
BaseFileSystemgetInputStream 在接口中 BaseFileSystemIOExceptionpublic OutputStream getOutputStream(String file) throws IOException
BaseFileSystemgetOutputStream 在接口中 BaseFileSystemIOExceptionpublic boolean isFileExist(String hdfsPath) throws IOException
BaseFileSystemisFileExist 在接口中 BaseFileSystemhdfsPath - hdfs文件路径IOExceptionpublic List<FileInfo> getDirFiles(String file) throws IOException
BaseFileSystemgetDirFiles 在接口中 BaseFileSystemfile - 目录路径IOExceptionpublic FileInfo getFiles(String file) throws IOException
BaseFileSystemgetFiles 在接口中 BaseFileSystemfile - 目录路径IOExceptionCopyright © 2022. All rights reserved.