001/*
002 * SonarQube
003 * Copyright (C) 2009-2017 SonarSource SA
004 * mailto:info AT sonarsource DOT com
005 *
006 * This program is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public License
017 * along with this program; if not, write to the Free Software Foundation,
018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
019 */
020package org.sonar.api.batch.fs;
021
022import java.io.File;
023import java.nio.file.Path;
024
025/**
026 * Layer over {@link java.io.File} for directories. You can access InputDir using {@link FileSystem#inputDir(File)}.
027 *
028 * @since 4.5
029 * @deprecated since 6.6 Ability to report issues or measures on directories will soon be dropped. Report issues on project if needed. 
030 */
031@Deprecated
032public interface InputDir extends InputPath {
033
034  /**
035   * Path relative to module base directory. Path is unique and identifies directory
036   * within given <code>{@link FileSystem}</code>. File separator is the forward
037   * slash ('/'), even on Microsoft Windows.
038   * <br>
039   * Returns <code>src/main/java/com</code> if module base dir is
040   * <code>/path/to/module</code> and if directory is
041   * <code>/path/to/module/src/main/java/com</code>.
042   * <br>
043   * Relative path is not null and is normalized ('foo/../foo' is replaced by 'foo').
044   */
045  @Override
046  String relativePath();
047
048  /**
049   * Normalized absolute path. File separator is forward slash ('/'), even on Microsoft Windows.
050   * <br>
051   * This is not canonical path. Symbolic links are not resolved. For example if /project/src links
052   * to /tmp/src and basedir is /project, then this method returns /project/src. Use
053   * {@code file().getCanonicalPath()} to resolve symbolic link.
054   */
055  @Override
056  String absolutePath();
057
058  /**
059   * The underlying absolute {@link java.io.File}
060   */
061  @Override
062  File file();
063
064  /**
065   * The underlying absolute {@link Path}
066   */
067  @Override
068  Path path();
069
070}