Package jetbrains.mps.vfs.iofs.jrt
Class JrtIoFile
- java.lang.Object
 - 
- jetbrains.mps.vfs.iofs.jrt.JrtIoFile
 
 
- 
- 
Constructor Summary
Constructors Constructor Description JrtIoFile(String jdkPath, String module, String pathInJDK, JrtIoFileSystem fs) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancreateNewFile()creates a physical filebooleandelete()FIXME document what happens if one deletes non-empty folder.booleanexists()IFilefindChild(String name)Immediate child only.IFilegetBundleHome()List<IFile>getChildren()IFilegetDescendant(String suffix)FileSystemgetFileSystem()Use getFS() instead Note the IFileSystem is per-protocol, in which it differs from FileSystem.IFileSystemgetFS()StringgetName()IFilegetParent()StringgetPath()Returns a path of this file in a file system.StringgetPathInJDK()QualifiedPathgetQualifiedPath()URLgetUrl()Deprecated.booleanisArchive()booleanisDirectory()booleanisInArchive()booleanisReadOnly()longlastModified()fixme if it is the same as in java.io.File then we need to enforce itlonglength()booleanmkdirs()booleanmove(IFile newParent)moves/renames the file at which the instance of thisIFilepointsInputStreamopenInputStream()OutputStreamopenOutputStream()booleanrename(String newName)renames the file at which the instance of thisIFilepoints (if it exists) the file stays under the same directory and changes its name to thenewNamebooleansetTimeStamp(long time)- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.vfs.IFile
addListener, isDescendant, isPackaged, refresh, removeListener 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getFileSystem
@NotNull public FileSystem getFileSystem()
Description copied from interface:IFileUse getFS() instead Note the IFileSystem is per-protocol, in which it differs from FileSystem.- Specified by:
 getFileSystemin interfaceIFile
 
- 
getFS
@NotNull public IFileSystem getFS()
 
- 
getPath
@NotNull public String getPath()
Description copied from interface:IFileReturns a path of this file in a file system. 
- 
getUrl
@Nullable @Deprecated public URL getUrl()
Deprecated.Description copied from interface:IFileuse getQualifiedPath() 
- 
getQualifiedPath
public QualifiedPath getQualifiedPath()
- Specified by:
 getQualifiedPathin interfaceIFile
 
- 
isInArchive
public boolean isInArchive()
- Specified by:
 isInArchivein interfaceIFile- Returns:
 - whether the underlying pathname points to an archive file or some of its contents
 
 
- 
getBundleHome
public IFile getBundleHome()
- Specified by:
 getBundleHomein interfaceIFile- Returns:
 - the jar or folder which contains this file
 
 
- 
createNewFile
public boolean createNewFile()
Description copied from interface:IFilecreates a physical file- Specified by:
 createNewFilein interfaceIFile- Returns:
 - whether it is a success
 
 
- 
delete
public boolean delete()
Description copied from interface:IFileFIXME document what happens if one deletes non-empty folder. IoFile seems to force deletion. Is it the contract? 
- 
rename
public boolean rename(@NotNull String newName)
Description copied from interface:IFilerenames the file at which the instance of thisIFilepoints (if it exists) the file stays under the same directory and changes its name to thenewName- Specified by:
 renamein interfaceIFile- Returns:
 - true iff success
//   * @deprecated use 
IFile.move(IFile) 
 
- 
move
public boolean move(@NotNull IFile newParent)
Description copied from interface:IFilemoves/renames the file at which the instance of thisIFilepoints 
- 
openOutputStream
public OutputStream openOutputStream()
- Specified by:
 openOutputStreamin interfaceIFile
 
- 
setTimeStamp
public boolean setTimeStamp(long time)
- Specified by:
 setTimeStampin interfaceIFile
 
- 
isReadOnly
public boolean isReadOnly()
- Specified by:
 isReadOnlyin interfaceIFile
 
- 
getDescendant
@NotNull public IFile getDescendant(@NotNull String suffix)
- Specified by:
 getDescendantin interfaceIFile
 
- 
findChild
@NotNull public IFile findChild(@NotNull String name)
Description copied from interface:IFileImmediate child only. Empty name is forbidden. Neither path separators nor archive separators can't present in name 
- 
isDirectory
public boolean isDirectory()
- Specified by:
 isDirectoryin interfaceIFile
 
- 
getChildren
@Nullable public List<IFile> getChildren()
- Specified by:
 getChildrenin interfaceIFile- Returns:
 - the children of this file in case when it is a folder, null iff it is a file and therefore has no children
 
 
- 
lastModified
public long lastModified()
Description copied from interface:IFilefixme if it is the same as in java.io.File then we need to enforce it- Specified by:
 lastModifiedin interfaceIFile
 
- 
openInputStream
public InputStream openInputStream() throws IOException
- Specified by:
 openInputStreamin interfaceIFile- Throws:
 IOException
 
 - 
 
 -