DocSpace-buildtools/thirdparty/AppLimit.CloudComputing.SharpBox/StorageProvider/API/GenericHelper.cs

28 lines
736 B
C#
Raw Normal View History

2020-04-23 09:38:50 +00:00
namespace AppLimit.CloudComputing.SharpBox.StorageProvider.API
2020-03-13 13:40:58 +00:00
{
internal class GenericHelper
{
public static string GetResourcePath(ICloudFileSystemEntry entry)
{
var current = entry;
var path = "";
while (current != null)
{
if (current.Name != "/")
{
if (path == string.Empty)
path = current.Id;
else
path = current.Id + "/" + path;
}
else
path = "/" + path;
current = current.Parent;
}
return path;
}
}
}