From 7d0aed9dfb7bcd1e6d5402be927ad1cf95b18e57 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 7 Sep 2015 19:54:48 +0200 Subject: [PATCH] remove FileHolder and all its usages from perforce integration --- .../com/intellij/openapi/vcs/FileHolder.java | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 platform/vcs-api/src/com/intellij/openapi/vcs/FileHolder.java diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/FileHolder.java b/platform/vcs-api/src/com/intellij/openapi/vcs/FileHolder.java deleted file mode 100644 index ebe2cc62577e..000000000000 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/FileHolder.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2000-2011 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.vcs; - -import com.intellij.openapi.vfs.VirtualFile; - -import java.io.File; - -/** - * Created by IntelliJ IDEA. - * User: Irina.Chernushina - * Date: 11/30/11 - * Time: 12:36 PM - */ -public class FileHolder { - private final File myIoFile; - private final VirtualFile myFile; - private Boolean myIsDir; - - public FileHolder(File ioFile) { - myIoFile = ioFile; - myFile = null; - } - - public FileHolder(VirtualFile file) { - myFile = file; - myIoFile = null; - } - - public String getPath() { - return myFile != null ? myFile.getPath() : myIoFile.getPath(); - } - - public String getName() { - return myFile != null ? myFile.getName() : myIoFile.getName(); - } - - public boolean isDirectory() { - if (myIsDir != null) return myIsDir; - return myFile != null ? myFile.isDirectory() : myIoFile.isDirectory(); - } - - public boolean exists() { - return myFile != null ? myFile.exists() : myIoFile.exists(); - } - - public boolean isValid() { - return myFile != null ? myFile.isValid() : true; - } - - public File getIoFile() { - return myIoFile; - } - - public VirtualFile getFile() { - return myFile; - } - - public boolean isVirtual() { - return myFile != null; - } - - public void setIsDir(boolean isDir) { - myIsDir = isDir; - } - - @Override - public String toString() { - return "FileHolder{" + - "myIoFile=" + myIoFile + - ", myFile=" + myFile + - ", myIsDir=" + myIsDir + - '}'; - } -}