public class VirtualDirectoryImpl extends VirtualFileSystemEntry
VirtualFile.PropNameEMPTY_ARRAYPROP_ENCODING, PROP_HIDDEN, PROP_NAME, PROP_SYMLINK_TARGET, PROP_WRITABLEEVER_CHANGED, NEVER_CHANGED| Modifier and Type | Method and Description |
|---|---|
void |
addChild(VirtualFileSystemEntry child) |
boolean |
allChildrenLoaded() |
protected boolean |
changeUserMap(KeyFMap oldMap,
KeyFMap newMap) |
byte [] |
contentsToByteArray()
Returns file content as an array of bytes.
|
void |
createAndAddChildren(java.util.List<? extends ChildInfo> added,
boolean markAllChildrenLoaded,
PairConsumer<? super VirtualFile,? super ChildInfo> fileCreated) |
VirtualFileSystemEntry |
createChild(java.lang.String name,
int id,
NewVirtualFileSystem delegate,
FileAttributes attributes,
boolean isEmptyDirectory) |
VirtualFileSystemEntry |
doFindChildById(int id) |
VirtualFileSystemEntry |
findChild(java.lang.String name)
Finds child of this file with the given name.
|
NewVirtualFile |
findChildIfCached(java.lang.String name) |
java.util.List<VirtualFile> |
getCachedChildren() |
VirtualFile [] |
getChildren()
Gets the child files.
|
NewVirtualFileSystem |
getFileSystem()
Gets the
VirtualFileSystem this file belongs to. |
java.io.InputStream |
getInputStream()
Gets the
InputStream for this file. |
java.io.OutputStream |
getOutputStream(java.lang.Object requestor,
long newModificationStamp,
long newTimeStamp)
Gets the
OutputStream for this file and sets modification stamp and time stamp to the specified values
after closing the stream. |
java.util.List<java.lang.String> |
getSuspiciousNames() |
protected KeyFMap |
getUserMap() |
boolean |
isDirectory()
Checks whether this file is a directory.
|
java.lang.Iterable<VirtualFile> |
iterInDbChildren()
iterated children will NOT contain NullVirtualFile.INSTANCE
|
java.lang.Iterable<VirtualFile> |
iterInDbChildrenWithoutLoadingVfsFromOtherProjects() |
void |
markDirtyRecursively() |
NewVirtualFile |
refreshAndFindChild(java.lang.String name) |
void |
removeChild(VirtualFile file) |
void |
removeChildren(TIntHashSet idsToRemove,
java.util.List<? extends java.lang.CharSequence> namesToRemove) |
protected void |
setUserMap(KeyFMap map) |
void |
validateChildrenToCreate(java.util.List<? extends VFileCreateEvent> childrenToCreate) |
appendPathOnFileSystem, copy, createChildData, createChildDirectory, delete, equals, exists, getCanonicalFile, getCanonicalPath, getCharset, getFileType, getId, getLength, getModificationStamp, getName, getNameId, getNameSequence, getParent, getPath, getPresentableName, getTimeStamp, getUrl, hashCode, invalidate, is, isDirty, isFileIndexed, isInLocalFileSystem, isRecursiveOrCircularSymLink, isValid, isWritable, markClean, markDirty, move, rename, setFileIndexed, setModificationStamp, setNewName, setParent, setTimeStamp, setWritable, toString, updatePropertyrefreshcontentsToByteArray, findFileByRelativePath, findOrCreateChildData, getBOM, getDetectedLineSeparator, getExtension, getModificationCount, getNameWithoutExtension, getOutputStream, getPresentableUrl, isCharsetSet, isValidName, nameEquals, refresh, setBinaryContent, setBinaryContent, setBinaryContent, setBOM, setCharset, setCharset, setCharset, setDetectedLineSeparator, setPreloadedContentHint, storeCharsetclearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replacepublic NewVirtualFileSystem getFileSystem()
VirtualFileVirtualFileSystem this file belongs to.getFileSystem in class NewVirtualFileVirtualFileSystempublic VirtualFileSystemEntry createChild(java.lang.String name, int id, NewVirtualFileSystem delegate, FileAttributes attributes, boolean isEmptyDirectory)
public NewVirtualFile refreshAndFindChild(java.lang.String name)
refreshAndFindChild in class NewVirtualFilepublic NewVirtualFile findChildIfCached(java.lang.String name)
findChildIfCached in class NewVirtualFilepublic java.lang.Iterable<VirtualFile> iterInDbChildren()
NewVirtualFileiterInDbChildren in class NewVirtualFilepublic java.lang.Iterable<VirtualFile> iterInDbChildrenWithoutLoadingVfsFromOtherProjects()
iterInDbChildrenWithoutLoadingVfsFromOtherProjects in class NewVirtualFilepublic VirtualFile [] getChildren()
VirtualFilegetChildren in class VirtualFilenull if this file is not a directorypublic VirtualFileSystemEntry findChild(java.lang.String name)
VirtualFilefindChild in class NewVirtualFilename - the file name to search bynull otherwisepublic VirtualFileSystemEntry doFindChildById(int id)
public byte [] contentsToByteArray()
throws java.io.IOException
VirtualFilecontentsToByteArray in class NewVirtualFilejava.io.IOException - if an I/O error occursVirtualFile.contentsToByteArray(boolean),
VirtualFile.getInputStream()public void createAndAddChildren(java.util.List<? extends ChildInfo> added, boolean markAllChildrenLoaded, PairConsumer<? super VirtualFile,? super ChildInfo> fileCreated)
public void addChild(VirtualFileSystemEntry child)
public void removeChild(VirtualFile file)
public void removeChildren(TIntHashSet idsToRemove,
java.util.List<? extends java.lang.CharSequence> namesToRemove)
public void validateChildrenToCreate(java.util.List<? extends VFileCreateEvent> childrenToCreate)
public boolean allChildrenLoaded()
public java.util.List<java.lang.String> getSuspiciousNames()
public boolean isDirectory()
VirtualFileisDirectory in class VirtualFiletrue if this file is a directory, false otherwisepublic java.util.List<VirtualFile> getCachedChildren()
getCachedChildren in class NewVirtualFilepublic java.io.InputStream getInputStream()
throws java.io.IOException
VirtualFileInputStream for this file.
Skips BOM if there is any. See Unicode Byte Order Mark FAQ for an explanation.getInputStream in class VirtualFileInputStreamjava.io.IOException - if an I/O error occursVirtualFile.contentsToByteArray()public java.io.OutputStream getOutputStream(java.lang.Object requestor,
long newModificationStamp,
long newTimeStamp)
throws java.io.IOException
VirtualFileGets the OutputStream for this file and sets modification stamp and time stamp to the specified values
after closing the stream.
Normally, you should not use this method.
Writes BOM first, if there is any. See Unicode Byte Order Mark FAQ for an explanation.
getOutputStream in class VirtualFilerequestor - any object to control who called this method. Note that
it is considered to be an external change if requestor is null.
See VirtualFileEvent.getRequestor() and SafeWriteRequestor.newModificationStamp - new modification stamp or -1 if no special value should be setnewTimeStamp - new time stamp or -1 if no special value should be setOutputStreamjava.io.IOException - if an I/O error occursVirtualFile.getModificationStamp()public void markDirtyRecursively()
markDirtyRecursively in class VirtualFileSystemEntryprotected void setUserMap(KeyFMap map)
setUserMap in class UserDataHolderBaseprotected KeyFMap getUserMap()
getUserMap in class UserDataHolderBaseprotected boolean changeUserMap(KeyFMap oldMap, KeyFMap newMap)
changeUserMap in class UserDataHolderBase