Package com._1c.g5.v8.dt.core.resource
Class DtFileSystemUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.core.resource.DtFileSystemUtil
-
public final class DtFileSystemUtil extends Object
DT file system utitilies.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createDeletionMarker(Path path)
Creates a deletion marker.static URI
createDtFileUri(String projectName, String filePath)
Creates a DT file URI.static String
extractFilePath(URI uri)
Extracts the file path from the given URI.static String
extractProjectName(URI uri)
Extracts the project name from the given URI.static Path
getResourcePath(org.eclipse.core.resources.IResource resource)
GetPath
byIResource
static boolean
isDeletionMarker(InputStream inputStream)
Checks if the specified input stream is a deletion marker.static boolean
isDeletionMarker(Path path)
Checks if the specified file is a deletion marker.static boolean
isDtFileUri(URI uri)
Checks if the given URI is a DT URI.
-
-
-
Method Detail
-
createDtFileUri
public static URI createDtFileUri(String projectName, String filePath)
Creates a DT file URI.- Parameters:
projectName
-filePath
-- Returns:
-
isDtFileUri
public static boolean isDtFileUri(URI uri)
Checks if the given URI is a DT URI.- Parameters:
uri
-- Returns:
-
extractProjectName
public static String extractProjectName(URI uri)
Extracts the project name from the given URI.- Parameters:
uri
-- Returns:
-
extractFilePath
public static String extractFilePath(URI uri)
Extracts the file path from the given URI.- Parameters:
uri
-- Returns:
-
isDeletionMarker
public static boolean isDeletionMarker(Path path) throws IOException
Checks if the specified file is a deletion marker.- Parameters:
path
-- Returns:
- Throws:
IOException
-
isDeletionMarker
public static boolean isDeletionMarker(InputStream inputStream) throws IOException
Checks if the specified input stream is a deletion marker.- Parameters:
inputStream
- the input stream to check, cannot benull
- Returns:
true
if the specified input strean is a deletion marker,false
otherwise- Throws:
IOException
- if an I/O error has occurred
-
createDeletionMarker
public static void createDeletionMarker(Path path) throws IOException
Creates a deletion marker.- Parameters:
path
-- Throws:
IOException
-
getResourcePath
public static Path getResourcePath(org.eclipse.core.resources.IResource resource) throws org.eclipse.core.runtime.CoreException
GetPath
byIResource
- Parameters:
resource
- theIResource
, cannot benull
- Returns:
- resource path, can be
null
- Throws:
org.eclipse.core.runtime.CoreException
-
-