mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CR-IC-1234 (virtual file properties API cleanup)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.vfs;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface VFileProperty {
|
||||
@NotNull
|
||||
String getName();
|
||||
|
||||
|
||||
class Impl implements VFileProperty {
|
||||
private final String myName;
|
||||
|
||||
public Impl(@NotNull String name) {
|
||||
myName = name;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return myName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return myName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VFileProperty HIDDEN = new Impl("hidden");
|
||||
VFileProperty SPECIAL = new Impl("special");
|
||||
VFileProperty SYMLINK = new Impl("symlink");
|
||||
}
|
||||
@@ -280,7 +280,7 @@ public class VfsUtilCore {
|
||||
* Returns {@code true} if given virtual file represents broken symbolic link (which points to non-existent file).
|
||||
*/
|
||||
public static boolean isBrokenLink(@NotNull VirtualFile file) {
|
||||
return file.isSymLink() && file.getCanonicalPath() == null;
|
||||
return file.is(VFileProperty.SYMLINK) && file.getCanonicalPath() == null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,12 +82,7 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica
|
||||
* @see VirtualFileListener#propertyChanged
|
||||
* @see VirtualFilePropertyEvent#getPropertyName
|
||||
*/
|
||||
@NonNls public static final String PROP_HIDDEN = "hidden";
|
||||
|
||||
/**
|
||||
* Used as a property name in the {@link #is(String)}.
|
||||
*/
|
||||
@NonNls public static final String PROP_SPECIAL = "special";
|
||||
@NonNls public static final String PROP_HIDDEN = VFileProperty.HIDDEN.getName();
|
||||
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vfs.VirtualFile");
|
||||
private static final Key<byte[]> BOM_KEY = Key.create("BOM");
|
||||
@@ -222,30 +217,25 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica
|
||||
*/
|
||||
public abstract boolean isDirectory();
|
||||
|
||||
/**
|
||||
* Checks whether this file is a symbolic link.
|
||||
*
|
||||
* @return <code>true</code> if this file is a symbolic link, <code>false</code> otherwise
|
||||
* @since 11.0
|
||||
*/
|
||||
/** @deprecated use {@link #is(VFileProperty)} (to remove in IDEA 14) */
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public boolean isSymLink() {
|
||||
return false;
|
||||
return is(VFileProperty.SYMLINK);
|
||||
}
|
||||
|
||||
/** @deprecated use {@link #is(String)} (to remove in IDEA 14) */
|
||||
/** @deprecated use {@link #is(VFileProperty)} (to remove in IDEA 14) */
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public boolean isSpecialFile() {
|
||||
return is(PROP_SPECIAL);
|
||||
return is(VFileProperty.SPECIAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this file has a specific property.
|
||||
* Examples of such properties are {@link #PROP_HIDDEN} or {@link #PROP_SPECIAL}.
|
||||
*
|
||||
* @return <code>true</code> if the file has a specific property, <code>false</code> otherwise
|
||||
* @since 13.0
|
||||
*/
|
||||
public boolean is(String property) {
|
||||
public boolean is(@NotNull VFileProperty property) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -362,7 +352,7 @@ public abstract class VirtualFile extends UserDataHolderBase implements Modifica
|
||||
child = this;
|
||||
}
|
||||
else if (name.equals("..")) {
|
||||
if (isSymLink()) {
|
||||
if (is(VFileProperty.SYMLINK)) {
|
||||
final VirtualFile canonicalFile = getCanonicalFile();
|
||||
child = canonicalFile != null ? canonicalFile.getParent() : null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -168,7 +168,7 @@ public abstract class VirtualFileVisitor<T> {
|
||||
}
|
||||
|
||||
final boolean allowVisitChildren(@NotNull VirtualFile file) {
|
||||
return !file.isSymLink() || myFollowSymLinks && !VfsUtilCore.isInvalidLink(file);
|
||||
return !file.is(VFileProperty.SYMLINK) || myFollowSymLinks && !VfsUtilCore.isInvalidLink(file);
|
||||
}
|
||||
|
||||
final boolean depthLimitReached() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,7 @@ import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.WritingAccessProvider;
|
||||
import com.intellij.ui.IconDeferrer;
|
||||
@@ -142,7 +143,7 @@ public class IconUtil {
|
||||
(!file.isWritable() || !WritingAccessProvider.isPotentiallyWritable(file, project))) {
|
||||
icon = new LayeredIcon(icon, PlatformIcons.LOCKED_ICON);
|
||||
}
|
||||
if (file.isSymLink()) {
|
||||
if (file.is(VFileProperty.SYMLINK)) {
|
||||
icon = new LayeredIcon(icon, PlatformIcons.SYMLINK_ICON);
|
||||
}
|
||||
|
||||
@@ -284,7 +285,7 @@ public class IconUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Result icons look like original but have equal (maximum) size
|
||||
* Result icons look like original but have equal (maximum) size
|
||||
*/
|
||||
@NotNull
|
||||
public static Icon[] getEqualSizedIcons(@NotNull Icon... icons) {
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.vfs.NonPhysicalFileSystem;
|
||||
import com.intellij.openapi.vfs.PersistentFSConstants;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.impl.PsiManagerEx;
|
||||
import com.intellij.psi.impl.PsiManagerImpl;
|
||||
@@ -268,7 +269,7 @@ public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi
|
||||
|
||||
@Nullable
|
||||
protected PsiFile createFile(@NotNull Project project, @NotNull VirtualFile file, @NotNull FileType fileType) {
|
||||
if (fileType.isBinary() || file.is(VirtualFile.PROP_SPECIAL)) {
|
||||
if (fileType.isBinary() || file.is(VFileProperty.SPECIAL)) {
|
||||
return new PsiBinaryFileImpl((PsiManagerImpl)getManager(), this);
|
||||
}
|
||||
if (!isTooLargeForIntelligence(file)) {
|
||||
@@ -539,8 +540,8 @@ public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi
|
||||
private final PsiFileImpl myFile;
|
||||
private volatile String myContent = null;
|
||||
private final long myModificationStamp;
|
||||
|
||||
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
|
||||
|
||||
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
|
||||
private final List<FileElement> myFileElementHardRefs = new SmartList<FileElement>();
|
||||
|
||||
private PsiFileContent(final PsiFileImpl file, final long modificationStamp) {
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.intellij.ide.util;
|
||||
|
||||
import com.intellij.navigation.NavigationItem;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
|
||||
import com.intellij.openapi.util.UserDataHolder;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.Navigatable;
|
||||
@@ -54,13 +54,13 @@ public class EditSourceUtil {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static boolean canNavigate (PsiElement element) {
|
||||
public static boolean canNavigate(PsiElement element) {
|
||||
if (element == null || !element.isValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
VirtualFile file = PsiUtilCore.getVirtualFile(element.getNavigationElement());
|
||||
return file != null && file.isValid() && !file.is(VirtualFile.PROP_SPECIAL) && !VfsUtilCore.isBrokenLink(file);
|
||||
return file != null && file.isValid() && !file.is(VFileProperty.SPECIAL) && !VfsUtilCore.isBrokenLink(file);
|
||||
}
|
||||
|
||||
public static void navigate(NavigationItem item, boolean requestFocus, boolean useCurrentWindow) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,6 +34,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.AsyncResult;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileSystem;
|
||||
import com.intellij.psi.*;
|
||||
@@ -304,6 +305,6 @@ public class PsiUtilBase extends PsiUtilCore {
|
||||
|
||||
public static boolean isSymLink(@NotNull final PsiFileSystemItem element) {
|
||||
final VirtualFile virtualFile = element.getVirtualFile();
|
||||
return virtualFile != null && virtualFile.isSymLink();
|
||||
return virtualFile != null && virtualFile.is(VFileProperty.SYMLINK);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -37,6 +37,7 @@ import com.intellij.openapi.roots.ui.configuration.ProjectSettingsService;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.NavigatableWithText;
|
||||
@@ -59,7 +60,7 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
|
||||
public PsiDirectoryNode(Project project, PsiDirectory value, ViewSettings viewSettings) {
|
||||
super(project, value, viewSettings);
|
||||
}
|
||||
|
||||
|
||||
protected boolean shouldShowModuleName() {
|
||||
return !PlatformUtils.isAppCode();
|
||||
}
|
||||
@@ -290,7 +291,7 @@ public class PsiDirectoryNode extends BasePsiNode<PsiDirectory> implements Navig
|
||||
icon = LayeredIcon.create(icon, PlatformIcons.LOCKED_ICON);
|
||||
}
|
||||
|
||||
if (file.isSymLink()) {
|
||||
if (file.is(VFileProperty.SYMLINK)) {
|
||||
icon = LayeredIcon.create(icon, PlatformIcons.SYMLINK_ICON);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,6 +31,7 @@ import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.pom.NavigatableWithText;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
@@ -74,7 +75,7 @@ public class PsiFileNode extends BasePsiNode<PsiFile> implements NavigatableWith
|
||||
data.setIcon(value.getIcon(Iconable.ICON_FLAG_READ_STATUS));
|
||||
|
||||
VirtualFile file = getVirtualFile();
|
||||
if (file != null && file.isSymLink()) {
|
||||
if (file != null && file.is(VFileProperty.SYMLINK)) {
|
||||
String target = file.getCanonicalPath();
|
||||
if (target == null) {
|
||||
data.setAttributesKey(CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES);
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.ui.ex.MessagesEx;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.WritingAccessProvider;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
@@ -193,7 +194,7 @@ public class DeleteHandler {
|
||||
if (!elementToDelete.isValid()) continue; //was already deleted
|
||||
if (elementToDelete instanceof PsiDirectory) {
|
||||
VirtualFile virtualFile = ((PsiDirectory)elementToDelete).getVirtualFile();
|
||||
if (virtualFile.isInLocalFileSystem() && !virtualFile.isSymLink()) {
|
||||
if (virtualFile.isInLocalFileSystem() && !virtualFile.is(VFileProperty.SYMLINK)) {
|
||||
ArrayList<VirtualFile> readOnlyFiles = new ArrayList<VirtualFile>();
|
||||
CommonRefactoringUtil.collectReadOnlyFiles(virtualFile, readOnlyFiles);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.intellij.openapi.roots.ContentIterator;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
|
||||
import java.io.File;
|
||||
@@ -66,7 +67,7 @@ public class LoadAllContentsAction extends AnAction implements DumbAware {
|
||||
ProjectRootManager.getInstance(project).getFileIndex().iterateContent(new ContentIterator() {
|
||||
@Override
|
||||
public boolean processFile(VirtualFile fileOrDir) {
|
||||
if (fileOrDir.isDirectory() || fileOrDir.is(VirtualFile.PROP_SPECIAL)) {
|
||||
if (fileOrDir.isDirectory() || fileOrDir.is(VFileProperty.SPECIAL)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.newvfs.ManagingFS;
|
||||
import com.intellij.openapi.vfs.newvfs.NewVirtualFile;
|
||||
@@ -91,18 +92,19 @@ public class LoadAllVfsStoredContentsAction extends AnAction implements DumbAwar
|
||||
}
|
||||
|
||||
public boolean processFile(NewVirtualFile file) {
|
||||
if (file.isDirectory() || file.is(VirtualFile.PROP_SPECIAL)) return true;
|
||||
if (file.isDirectory() || file.is(VFileProperty.SPECIAL)) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
DataInputStream stream = FSRecords.readContent(file.getId());
|
||||
if (stream == null) return true;
|
||||
byte[] bytes = FileUtil.loadBytes(stream);
|
||||
totalSize.addAndGet(bytes.length);
|
||||
count.incrementAndGet();
|
||||
|
||||
ProgressManager.getInstance().getProgressIndicator().setText(file.getPresentableUrl());
|
||||
}
|
||||
catch (IOException e1) {
|
||||
LOG.error(e1);
|
||||
catch (IOException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.LayeredIcon;
|
||||
import com.intellij.ui.UIBundle;
|
||||
@@ -166,7 +167,7 @@ public class FileChooserDescriptor implements Cloneable {
|
||||
}
|
||||
|
||||
protected static Icon dressIcon(final VirtualFile file, final Icon baseIcon) {
|
||||
return file.isValid() && file.isSymLink() ? new LayeredIcon(baseIcon, PlatformIcons.SYMLINK_ICON) : baseIcon;
|
||||
return file.isValid() && file.is(VFileProperty.SYMLINK) ? new LayeredIcon(baseIcon, PlatformIcons.SYMLINK_ICON) : baseIcon;
|
||||
}
|
||||
|
||||
public String getName(final VirtualFile file) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -101,7 +102,7 @@ public class FileElement {
|
||||
return file != null &&
|
||||
file.isValid() &&
|
||||
file.isInLocalFileSystem() &&
|
||||
(file.is(VirtualFile.PROP_HIDDEN) || SystemInfo.isUnix && file.getName().startsWith("."));
|
||||
(file.is(VFileProperty.HIDDEN) || SystemInfo.isUnix && file.getName().startsWith("."));
|
||||
}
|
||||
|
||||
public static boolean isArchive(@Nullable VirtualFile file) {
|
||||
|
||||
@@ -75,7 +75,7 @@ public class VfsUtil extends VfsUtilCore {
|
||||
@Nullable VirtualFileFilter filter) throws IOException {
|
||||
@SuppressWarnings("UnsafeVfsRecursion") VirtualFile[] children = fromDir.getChildren();
|
||||
for (VirtualFile child : children) {
|
||||
if (!child.isSymLink() && !child.is(VirtualFile.PROP_SPECIAL) && (filter == null || filter.accept(child))) {
|
||||
if (!child.is(VFileProperty.SYMLINK) && !child.is(VFileProperty.SPECIAL) && (filter == null || filter.accept(child))) {
|
||||
if (!child.isDirectory()) {
|
||||
copyFile(requestor, child, toDir);
|
||||
}
|
||||
|
||||
+2
-1
@@ -37,6 +37,7 @@ import com.intellij.openapi.util.io.ByteSequence;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileSystem;
|
||||
import com.intellij.openapi.vfs.newvfs.FileSystemInterface;
|
||||
@@ -340,7 +341,7 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements NamedJDOME
|
||||
@NotNull
|
||||
@Override
|
||||
public FileType detectFileTypeFromContent(@NotNull VirtualFile file) {
|
||||
if (file.isDirectory() || !file.isValid() || file.is(VirtualFile.PROP_SPECIAL)) {
|
||||
if (file.isDirectory() || !file.isValid() || file.is(VFileProperty.SPECIAL)) {
|
||||
return UnknownFileType.INSTANCE;
|
||||
}
|
||||
FileType fileType = file.getUserData(DETECTED_FROM_CONTENT_FILE_TYPE_KEY);
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.vfs.InvalidVirtualFileAccessException;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -86,7 +87,7 @@ public class FileContentQueue {
|
||||
private void addLast(VirtualFile file, @NotNull final ProgressIndicator indicator) throws InterruptedException {
|
||||
FileContent content = new FileContent(file);
|
||||
|
||||
if (file.isValid() && !file.isDirectory() && !file.is(VirtualFile.PROP_SPECIAL) && !VfsUtilCore.isBrokenLink(file)) {
|
||||
if (file.isValid() && !file.isDirectory() && !file.is(VFileProperty.SPECIAL) && !VfsUtilCore.isBrokenLink(file)) {
|
||||
if (!doLoadContent(content, indicator)) {
|
||||
content.setEmptyContent();
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.intellij.openapi.util.NotNullLazyValue;
|
||||
import com.intellij.openapi.vcs.FileStatus;
|
||||
import com.intellij.openapi.vcs.FileStatusListener;
|
||||
import com.intellij.openapi.vcs.FileStatusManager;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.util.ThreeState;
|
||||
@@ -139,7 +140,7 @@ public class FileStatusManagerImpl extends FileStatusManager implements ProjectC
|
||||
}
|
||||
|
||||
public static FileStatus getDefaultStatus(@NotNull final VirtualFile file) {
|
||||
return file.isValid() && file.is(VirtualFile.PROP_SPECIAL) ? FileStatus.IGNORED : FileStatus.NOT_CHANGED;
|
||||
return file.isValid() && file.is(VFileProperty.SPECIAL) ? FileStatus.IGNORED : FileStatus.NOT_CHANGED;
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
|
||||
+1
-1
@@ -474,7 +474,7 @@ public abstract class LocalFileSystemBase extends LocalFileSystem {
|
||||
}
|
||||
|
||||
private static boolean shallUseSafeStream(final Object requestor, @NotNull VirtualFile file) {
|
||||
return requestor instanceof SafeWriteRequestor && GeneralSettings.getInstance().isUseSafeWrite() && !file.isSymLink();
|
||||
return requestor instanceof SafeWriteRequestor && GeneralSettings.getInstance().isUseSafeWrite() && !file.is(VFileProperty.SYMLINK);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.intellij.openapi.vfs.newvfs;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -42,7 +43,7 @@ public class VfsImplUtil {
|
||||
for (String pathElement : data.second) {
|
||||
if (pathElement.isEmpty() || ".".equals(pathElement)) continue;
|
||||
if ("..".equals(pathElement)) {
|
||||
if (file.isSymLink()) {
|
||||
if (file.is(VFileProperty.SYMLINK)) {
|
||||
final NewVirtualFile canonicalFile = file.getCanonicalFile();
|
||||
file = canonicalFile != null ? canonicalFile.getParent() : null;
|
||||
}
|
||||
@@ -71,7 +72,7 @@ public class VfsImplUtil {
|
||||
for (String pathElement : data.second) {
|
||||
if (pathElement.isEmpty() || ".".equals(pathElement)) continue;
|
||||
if ("..".equals(pathElement)) {
|
||||
if (file.isSymLink()) {
|
||||
if (file.is(VFileProperty.SYMLINK)) {
|
||||
final String canonicalPath = file.getCanonicalPath();
|
||||
final NewVirtualFile canonicalFile = canonicalPath != null ? findFileByPathIfCached(vfs, canonicalPath) : null;
|
||||
file = canonicalFile != null ? canonicalFile.getParent() : null;
|
||||
@@ -101,7 +102,7 @@ public class VfsImplUtil {
|
||||
for (String pathElement : data.second) {
|
||||
if (pathElement.isEmpty() || ".".equals(pathElement)) continue;
|
||||
if ("..".equals(pathElement)) {
|
||||
if (file.isSymLink()) {
|
||||
if (file.is(VFileProperty.SYMLINK)) {
|
||||
final String canonicalPath = file.getCanonicalPath();
|
||||
final NewVirtualFile canonicalFile = canonicalPath != null ? refreshAndFindFileByPath(vfs, canonicalPath) : null;
|
||||
file = canonicalFile != null ? canonicalFile.getParent() : null;
|
||||
|
||||
+7
-10
@@ -23,6 +23,7 @@ import com.intellij.openapi.util.io.FileTooBigException;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VfsBundle;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.encoding.EncodingManager;
|
||||
@@ -90,7 +91,7 @@ public abstract class VirtualFileSystemEntry extends NewVirtualFile {
|
||||
}
|
||||
|
||||
private void updateLinkStatus() {
|
||||
boolean isSymLink = isSymLink();
|
||||
boolean isSymLink = is(VFileProperty.SYMLINK);
|
||||
if (isSymLink) {
|
||||
String target = myParent.getFileSystem().resolveSymLink(this);
|
||||
putUserData(SYMLINK_TARGET, target != null ? FileUtil.toSystemIndependentName(target) : target);
|
||||
@@ -412,14 +413,10 @@ public abstract class VirtualFileSystemEntry extends NewVirtualFile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSymLink() {
|
||||
return getFlagInt(IS_SYMLINK_FLAG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean is(String property) {
|
||||
if (property == PROP_SPECIAL) return getFlagInt(IS_SPECIAL_FLAG);
|
||||
if (property == PROP_HIDDEN) return getFlagInt(IS_HIDDEN_FLAG);
|
||||
public boolean is(@NotNull VFileProperty property) {
|
||||
if (property == VFileProperty.SPECIAL) return getFlagInt(IS_SPECIAL_FLAG);
|
||||
if (property == VFileProperty.HIDDEN) return getFlagInt(IS_HIDDEN_FLAG);
|
||||
if (property == VFileProperty.SYMLINK) return getFlagInt(IS_SYMLINK_FLAG);
|
||||
return super.is(property);
|
||||
}
|
||||
|
||||
@@ -431,7 +428,7 @@ public abstract class VirtualFileSystemEntry extends NewVirtualFile {
|
||||
@Override
|
||||
public String getCanonicalPath() {
|
||||
if (getFlagInt(HAS_SYMLINK_FLAG)) {
|
||||
if (isSymLink()) {
|
||||
if (is(VFileProperty.SYMLINK)) {
|
||||
return getUserData(SYMLINK_TARGET);
|
||||
}
|
||||
VirtualDirectoryImpl parent = myParent;
|
||||
|
||||
+4
-3
@@ -21,6 +21,7 @@ import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileAttributes;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.newvfs.NewVirtualFile;
|
||||
@@ -194,7 +195,7 @@ public class RefreshWorker {
|
||||
}
|
||||
|
||||
if (SystemInfo.isWindows) {
|
||||
boolean currentHidden = file.is(VirtualFile.PROP_HIDDEN);
|
||||
boolean currentHidden = file.is(VFileProperty.HIDDEN);
|
||||
boolean upToDateHidden = attributes.isHidden();
|
||||
if (currentHidden != upToDateHidden) {
|
||||
scheduleAttributeChange(file, VirtualFile.PROP_HIDDEN, currentHidden, upToDateHidden);
|
||||
@@ -221,8 +222,8 @@ public class RefreshWorker {
|
||||
@NotNull VirtualFile child,
|
||||
@NotNull FileAttributes childAttributes) {
|
||||
boolean currentIsDirectory = child.isDirectory();
|
||||
boolean currentIsSymlink = child.isSymLink();
|
||||
boolean currentIsSpecial = child.is(VirtualFile.PROP_SPECIAL);
|
||||
boolean currentIsSymlink = child.is(VFileProperty.SYMLINK);
|
||||
boolean currentIsSpecial = child.is(VFileProperty.SPECIAL);
|
||||
boolean upToDateIsDirectory = childAttributes.isDirectory();
|
||||
boolean upToDateIsSymlink = childAttributes.isSymLink();
|
||||
boolean upToDateIsSpecial = childAttributes.isSpecial();
|
||||
|
||||
+20
-21
@@ -20,10 +20,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileVisitor;
|
||||
import com.intellij.openapi.vfs.*;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
@@ -60,7 +57,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File dotLinkFile = createSymLink(".", myTempDir + "/dot_link");
|
||||
VirtualFile dotLinkVFile = refreshAndFind(dotLinkFile);
|
||||
assertNotNull(dotLinkVFile);
|
||||
assertTrue(dotLinkVFile.isSymLink());
|
||||
assertTrue(dotLinkVFile.is(VFileProperty.SYMLINK));
|
||||
assertTrue(dotLinkVFile.isDirectory());
|
||||
assertPathsEqual(myTempDir.getPath(), dotLinkVFile.getCanonicalPath());
|
||||
assertVisitedPaths(dotLinkVFile.getPath());
|
||||
@@ -71,7 +68,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File upLinkFile = createSymLink(upDir.getPath(), upDir.getPath() + "/up_link");
|
||||
VirtualFile upLinkVFile = refreshAndFind(upLinkFile);
|
||||
assertNotNull(upLinkVFile);
|
||||
assertTrue(upLinkVFile.isSymLink());
|
||||
assertTrue(upLinkVFile.is(VFileProperty.SYMLINK));
|
||||
assertTrue(upLinkVFile.isDirectory());
|
||||
assertPathsEqual(upDir.getPath(), upLinkVFile.getCanonicalPath());
|
||||
assertVisitedPaths(upDir.getPath(), upLinkVFile.getPath());
|
||||
@@ -80,7 +77,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
assertTrue(repeatedLinksFile.getPath(), repeatedLinksFile.isDirectory());
|
||||
VirtualFile repeatedLinksVFile = refreshAndFind(repeatedLinksFile);
|
||||
assertNotNull(repeatedLinksFile.getPath(), repeatedLinksVFile);
|
||||
assertTrue(repeatedLinksVFile.isSymLink());
|
||||
assertTrue(repeatedLinksVFile.is(VFileProperty.SYMLINK));
|
||||
assertTrue(repeatedLinksVFile.isDirectory());
|
||||
assertPathsEqual(upDir.getPath(), repeatedLinksVFile.getCanonicalPath());
|
||||
assertEquals(upLinkVFile.getCanonicalFile(), repeatedLinksVFile.getCanonicalFile());
|
||||
@@ -110,7 +107,8 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File targetFile = createTestFile(myTempDir, "target.txt");
|
||||
File linkFile = createSymLink(targetFile.getPath(), myTempDir + "/link");
|
||||
VirtualFile linkVFile = refreshAndFind(linkFile);
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() && linkVFile.isSymLink());
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() &&
|
||||
linkVFile.is(VFileProperty.SYMLINK));
|
||||
|
||||
setWritableAndCheck(targetFile, true);
|
||||
refresh();
|
||||
@@ -122,7 +120,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File targetDir = createTestDir(myTempDir, "target");
|
||||
File linkDir = createSymLink(targetDir.getPath(), myTempDir + "/linkDir");
|
||||
VirtualFile linkVDir = refreshAndFind(linkDir);
|
||||
assertTrue("link=" + linkDir + ", vLink=" + linkVDir, linkVDir != null && linkVDir.isDirectory() && linkVDir.isSymLink());
|
||||
assertTrue("link=" + linkDir + ", vLink=" + linkVDir, linkVDir != null && linkVDir.isDirectory() && linkVDir.is(VFileProperty.SYMLINK));
|
||||
|
||||
if (!SystemInfo.isWindows) {
|
||||
setWritableAndCheck(targetDir, true);
|
||||
@@ -146,7 +144,8 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File targetFile = createTestFile(myTempDir, "target");
|
||||
File linkFile = createSymLink(targetFile.getPath(), myTempDir + "/link");
|
||||
VirtualFile linkVFile = refreshAndFind(linkFile);
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() && linkVFile.isSymLink());
|
||||
assertTrue("link=" + linkFile + ", vLink=" + linkVFile, linkVFile != null && !linkVFile.isDirectory() &&
|
||||
linkVFile.is(VFileProperty.SYMLINK));
|
||||
|
||||
AccessToken token = ApplicationManager.getApplication().acquireWriteActionLock(getClass());
|
||||
try {
|
||||
@@ -165,7 +164,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File linkDir = createSymLink(targetDir.getPath(), myTempDir + "/linkDir");
|
||||
VirtualFile linkVDir = refreshAndFind(linkDir);
|
||||
assertTrue("link=" + linkDir + ", vLink=" + linkVDir,
|
||||
linkVDir != null && linkVDir.isDirectory() && linkVDir.isSymLink() && linkVDir.getChildren().length == 1);
|
||||
linkVDir != null && linkVDir.isDirectory() && linkVDir.is(VFileProperty.SYMLINK) && linkVDir.getChildren().length == 1);
|
||||
|
||||
token = ApplicationManager.getApplication().acquireWriteActionLock(getClass());
|
||||
try {
|
||||
@@ -188,33 +187,33 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File link = createSymLink(targetFile.getPath(), myTempDir + "/link");
|
||||
VirtualFile vFile1 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vFile1,
|
||||
vFile1 != null && !vFile1.isDirectory() && vFile1.isSymLink());
|
||||
vFile1 != null && !vFile1.isDirectory() && vFile1.is(VFileProperty.SYMLINK));
|
||||
|
||||
// file link => dir
|
||||
assertTrue(link.getPath(), link.delete() && link.mkdir() && link.isDirectory());
|
||||
VirtualFile vFile2 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vFile2,
|
||||
!vFile1.isValid() && vFile2 != null && vFile2.isDirectory() && !vFile2.isSymLink());
|
||||
!vFile1.isValid() && vFile2 != null && vFile2.isDirectory() && !vFile2.is(VFileProperty.SYMLINK));
|
||||
|
||||
// dir => dir link
|
||||
assertTrue(link.getPath(), link.delete());
|
||||
link = createSymLink(targetDir.getPath(), myTempDir + "/link");
|
||||
vFile1 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vFile1,
|
||||
!vFile2.isValid() && vFile1 != null && vFile1.isDirectory() && vFile1.isSymLink());
|
||||
!vFile2.isValid() && vFile1 != null && vFile1.isDirectory() && vFile1.is(VFileProperty.SYMLINK));
|
||||
|
||||
// dir link => file
|
||||
assertTrue(link.getPath(), link.delete() && link.createNewFile() && link.isFile());
|
||||
vFile2 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vFile1,
|
||||
!vFile1.isValid() && vFile2 != null && !vFile2.isDirectory() && !vFile2.isSymLink());
|
||||
!vFile1.isValid() && vFile2 != null && !vFile2.isDirectory() && !vFile2.is(VFileProperty.SYMLINK));
|
||||
|
||||
// file => file link
|
||||
assertTrue(link.getPath(), link.delete());
|
||||
link = createSymLink(targetFile.getPath(), myTempDir + "/link");
|
||||
vFile1 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vFile1,
|
||||
!vFile2.isValid() && vFile1 != null && !vFile1.isDirectory() && vFile1.isSymLink());
|
||||
!vFile2.isValid() && vFile1 != null && !vFile1.isDirectory() && vFile1.is(VFileProperty.SYMLINK));
|
||||
}
|
||||
|
||||
public void testDirLinkSwitch() throws Exception {
|
||||
@@ -227,7 +226,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File link = createSymLink(targetDir1.getPath(), myTempDir + "/link");
|
||||
VirtualFile vLink1 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vLink1,
|
||||
vLink1 != null && vLink1.isDirectory() && vLink1.isSymLink());
|
||||
vLink1 != null && vLink1.isDirectory() && vLink1.is(VFileProperty.SYMLINK));
|
||||
assertEquals(1, vLink1.getChildren().length);
|
||||
|
||||
assertTrue(link.toString(), link.delete());
|
||||
@@ -237,7 +236,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
assertFalse(vLink1.isValid());
|
||||
VirtualFile vLink2 = myFileSystem.findFileByIoFile(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vLink2,
|
||||
vLink2 != null && vLink2.isDirectory() && vLink2.isSymLink());
|
||||
vLink2 != null && vLink2.isDirectory() && vLink2.is(VFileProperty.SYMLINK));
|
||||
assertEquals(2, vLink2.getChildren().length);
|
||||
}
|
||||
|
||||
@@ -250,7 +249,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
File link = createSymLink(target1.getPath(), myTempDir + "/link");
|
||||
VirtualFile vLink1 = refreshAndFind(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vLink1,
|
||||
vLink1 != null && !vLink1.isDirectory() && vLink1.isSymLink());
|
||||
vLink1 != null && !vLink1.isDirectory() && vLink1.is(VFileProperty.SYMLINK));
|
||||
assertEquals(FileUtil.loadFile(target1), VfsUtilCore.loadText(vLink1));
|
||||
|
||||
assertTrue(link.toString(), link.delete());
|
||||
@@ -260,7 +259,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
assertFalse(vLink1.isValid());
|
||||
VirtualFile vLink2 = myFileSystem.findFileByIoFile(link);
|
||||
assertTrue("link=" + link + ", vLink=" + vLink2,
|
||||
vLink2 != null && !vLink2.isDirectory() && vLink2.isSymLink());
|
||||
vLink2 != null && !vLink2.isDirectory() && vLink2.is(VFileProperty.SYMLINK));
|
||||
assertEquals(FileUtil.loadFile(target2), VfsUtilCore.loadText(vLink2));
|
||||
}
|
||||
|
||||
@@ -335,7 +334,7 @@ public class SymlinkHandlingTest extends SymlinkTestCase {
|
||||
}
|
||||
|
||||
private static void assertBrokenLink(@NotNull VirtualFile link) {
|
||||
assertTrue(link.isSymLink());
|
||||
assertTrue(link.is(VFileProperty.SYMLINK));
|
||||
assertEquals(0, link.getLength());
|
||||
assertNull(link.getCanonicalPath(), link.getCanonicalPath());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.mock;
|
||||
|
||||
import com.intellij.openapi.vfs.VFileProperty;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -28,8 +29,8 @@ public class MockVirtualLink extends MockVirtualFile {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSymLink() {
|
||||
return true;
|
||||
public boolean is(@NotNull VFileProperty property) {
|
||||
return property == VFileProperty.SYMLINK || super.is(property);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -240,7 +240,7 @@ public abstract class VcsVFSListener implements Disposable {
|
||||
}
|
||||
|
||||
private void addFileToMove(final VirtualFile file, final String newParentPath, final String newName) {
|
||||
if (file.isDirectory() && !file.isSymLink() && !isDirectoryVersioningSupported()) {
|
||||
if (file.isDirectory() && !file.is(VFileProperty.SYMLINK) && !isDirectoryVersioningSupported()) {
|
||||
@SuppressWarnings("UnsafeVfsRecursion") VirtualFile[] children = file.getChildren();
|
||||
if (children != null) {
|
||||
for (VirtualFile child : children) {
|
||||
|
||||
Reference in New Issue
Block a user