Skip to content

Commit

Permalink
v 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
olduh29 committed May 15, 2023
1 parent b46b9bd commit 7408697
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
15 changes: 14 additions & 1 deletion SharpCoreFileSystem/FileSystems/EmbeddedResourceFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@ public ICollection<FileSystemPath> GetEntities(FileSystemPath path)
{
if (!path.IsRoot)
throw new DirectoryNotFoundException();
return Assembly.GetManifestResourceNames().Select(name => FileSystemPath.Root.AppendFile(name.Replace(AssemblyName+".",""))).ToArray();
var entities = new List<FileSystemPath>();
var resources = Assembly.GetManifestResourceNames();

foreach (var resource in resources)
{
var res = resource.Replace(AssemblyName + ".", "");
var elements = res.Split(new[] { '.' });
var resourcePath = elements.Take(elements.Length - 2);
var entityPath = "/"+string.Join("/", resourcePath) + elements[elements.Length - 2] + "." + elements[elements.Length - 1];
entities.Add(entityPath);
}

return entities;
//return Assembly.GetManifestResourceNames().Select(name => FileSystemPath.Root.AppendFile(name.Replace(AssemblyName+".",""))).ToArray();
}

public bool Exists(FileSystemPath path)
Expand Down
6 changes: 3 additions & 3 deletions SharpCoreFileSystem/SharpCoreFileSystem.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Description>A virtual file system for .NET written in C#</Description>
<Authors>b3b00</Authors>
<version>1.0.7</version>
<version>1.0.8</version>
<PackageProjectUrl>https://github.com/b3b00/sharpfilesystem</PackageProjectUrl>
<RepositoryUrl>https://github.com/b3b00/sharpfilesystem</RepositoryUrl>
<PackageLicenseUrl>https://github.com/b3b00/sharpfilesystem/blob/master/LICENSE</PackageLicenseUrl>
<PackageVersion>1.0.7</PackageVersion>
<PackageVersion>1.0.8</PackageVersion>
<RootNamespace>SharpFileSystem</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'" />
Expand All @@ -29,7 +29,7 @@
<!-- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19270-01">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference> -->
</PackageReference> -->
<PackageReference Include="System.Memory" Version="4.5.3" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
Expand Down

0 comments on commit 7408697

Please sign in to comment.