reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (REEF-2036) IFileSystem api to check if uri is for a directory
Date Sat, 16 Jun 2018 00:11:00 GMT


ASF GitHub Bot commented on REEF-2036:

singlis commented on a change in pull request #1473: [REEF-2036] Add IFileSystem api to check
if uri is a directory

 File path: lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
 @@ -123,6 +123,19 @@ public void CreateDirectory(Uri directoryUri)
+        /// <summary>
+        /// Checks if uri is a directory uri.
+        /// </summary>
+        /// <param name="uri">uri of the directory/file</param>
+        /// <returns>true if uri is for a directory else false</returns>
+        public bool IsDirectory(Uri uri)
+        {
+            var path = uri.AbsolutePath.Trim('/');
 Review comment:
   Why does the uri need to trim the '/'?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> IFileSystem api to check if uri is for a directory
> --------------------------------------------------
>                 Key: REEF-2036
>                 URL:
>             Project: REEF
>          Issue Type: New Feature
>          Components: REEF
>            Reporter: Dwaipayan Mukhopadhyay
>            Assignee: Dwaipayan Mukhopadhyay
>            Priority: Major
> Currently, there is no way to check if a location specified by a uri is a directory
or not. The only way to check it is by calling fs.GetChildren and checking for an exception.
There should be a more graceful way of doing this check by adding an api.

This message was sent by Atlassian JIRA

View raw message