get full path of FileSystemObjectModel file embedded in an archive file
This commit is contained in:
parent
dbf167d54a
commit
9baa9d9361
@ -32,6 +32,11 @@ namespace UniversalEditor.Accessors
|
||||
File = file;
|
||||
}
|
||||
|
||||
public override string GetFileName()
|
||||
{
|
||||
return String.Format("{0}|{1}", File.FileSystem.Accessor?.GetFileName(), File.Path);
|
||||
}
|
||||
|
||||
protected override Accessor GetRelativeInternal(string filename, string prefix = null)
|
||||
{
|
||||
if (File.Parent != null)
|
||||
|
||||
@ -338,6 +338,25 @@ namespace UniversalEditor.ObjectModels.FileSystem
|
||||
/// </summary>
|
||||
public FileSource Source { get; set; } = null;
|
||||
|
||||
[NonSerializedProperty]
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
List<string> list = new List<string>();
|
||||
IFileSystemContainer parent = Parent;
|
||||
list.Add(Name);
|
||||
while (parent != null)
|
||||
{
|
||||
list.Add(parent.Name);
|
||||
parent = parent.Parent;
|
||||
}
|
||||
list.Reverse();
|
||||
|
||||
return String.Join("/", list.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
[NonSerializedProperty]
|
||||
public IFileSystemContainer Parent { get; internal set; } = null;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user