org.nlogo.workspace
Class DefaultFileManager
java.lang.Object
org.nlogo.workspace.DefaultFileManager
- All Implemented Interfaces:
- FileManager
public final class DefaultFileManager
- extends Object
- implements FileManager
DefaultFileManager
public DefaultFileManager(AbstractWorkspace workspace)
getErrorInfo
public String getErrorInfo()
throws IOException
- Specified by:
getErrorInfo
in interface FileManager
- Throws:
IOException
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interface FileManager
getFile
public org.nlogo.util.File getFile(String fileName)
- Specified by:
getFile
in interface FileManager
setPrefix
public void setPrefix(String newPrefix)
- Specified by:
setPrefix
in interface FileManager
setPrefix
public void setPrefix(URL newPrefix)
- Specified by:
setPrefix
in interface FileManager
attachPrefix
public String attachPrefix(String filename)
throws MalformedURLException
- Specified by:
attachPrefix
in interface FileManager
- Throws:
MalformedURLException
hasCurrentFile
public boolean hasCurrentFile()
- Specified by:
hasCurrentFile
in interface FileManager
setCurrentFile
public void setCurrentFile(org.nlogo.util.File newFile)
ensureMode
public void ensureMode(int openMode)
throws IOException
- Specified by:
ensureMode
in interface FileManager
- Throws:
IOException
fileExists
public boolean fileExists(String filePath)
- Specified by:
fileExists
in interface FileManager
deleteFile
public void deleteFile(String filePath)
throws IOException
- Specified by:
deleteFile
in interface FileManager
- Throws:
IOException
openFile
public void openFile(String newFileName)
throws IOException
- Specified by:
openFile
in interface FileManager
- Throws:
IOException
flushCurrentFile
public void flushCurrentFile()
throws IOException
- Specified by:
flushCurrentFile
in interface FileManager
- Throws:
IOException
flushFile
public void flushFile(String flushFileName)
throws IOException
- Throws:
IOException
closeCurrentFile
public void closeCurrentFile()
throws IOException
- Specified by:
closeCurrentFile
in interface FileManager
- Throws:
IOException
readLine
public String readLine()
throws IOException
- Specified by:
readLine
in interface FileManager
- Throws:
IOException
readChars
public String readChars(int num)
throws IOException
- Specified by:
readChars
in interface FileManager
- Throws:
IOException
readRemainder
public String readRemainder()
throws IOException
- Throws:
IOException
read
public Object read(World world)
throws IOException,
CompilerException
- Specified by:
read
in interface FileManager
- Throws:
IOException
CompilerException
eof
public boolean eof()
throws IOException
- Specified by:
eof
in interface FileManager
- Throws:
IOException
closeAllFiles
public void closeAllFiles()
throws IOException
- Specified by:
closeAllFiles
in interface FileManager
- Throws:
IOException
writeOutputObject
public void writeOutputObject(org.nlogo.util.OutputObject oo)
handleModelChange
public void handleModelChange()