public abstract class BaseFileSystem<T extends NewFileIO> extends Object implements FileSystem<T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected Emulator<T> |
emulator |
protected File |
rootDir |
DEFAULT_ROOT_FS, DEFAULT_WORK_DIR| 构造器和说明 |
|---|
BaseFileSystem(Emulator<T> emulator,
File rootDir) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract T |
createStdin(int oflags) |
protected abstract T |
createStdout(int oflags,
File stdio,
String pathname) |
File |
createWorkDir() |
File |
getRootDir() |
protected abstract boolean |
hasAppend(int oflags) |
protected abstract boolean |
hasCreat(int oflags) |
protected abstract boolean |
hasDirectory(int oflags) |
protected abstract boolean |
hasExcl(int oflags) |
protected void |
initialize(File rootDir) |
boolean |
mkdir(String path,
int mode) |
FileResult<T> |
open(String pathname,
int oflags) |
int |
rename(String oldPath,
String newPath) |
void |
rmdir(String path) |
void |
unlink(String path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDirectoryFileIO, createSimpleFileIOprotected final File rootDir
protected void initialize(File rootDir) throws IOException
IOExceptionpublic FileResult<T> open(String pathname, int oflags)
open 在接口中 FileSystem<T extends NewFileIO>protected abstract T createStdin(int oflags)
public boolean mkdir(String path, int mode)
mkdir 在接口中 FileSystem<T extends NewFileIO>true表示创建成功public void rmdir(String path)
rmdir 在接口中 FileSystem<T extends NewFileIO>protected abstract boolean hasCreat(int oflags)
protected abstract boolean hasDirectory(int oflags)
protected abstract boolean hasAppend(int oflags)
protected abstract boolean hasExcl(int oflags)
public void unlink(String path)
unlink 在接口中 FileSystem<T extends NewFileIO>public File getRootDir()
getRootDir 在接口中 FileSystem<T extends NewFileIO>public File createWorkDir()
createWorkDir 在接口中 FileSystem<T extends NewFileIO>Copyright © 2022. All rights reserved.