Questions tagged [filetree]

A FileTree represents a hierarchy of files

81 questions
0
votes
0 answers

Time difference between iterating over a file tree created during a scan vs. one created by duplicating the scanned tree

(Title and question have been significantly changed, as the none of the important parts ended up being relevant to the problem) I have a generated file tree of a hard drive, and I'm creating a function to highlight every instance of an extension in…
trigger_segfault
  • 554
  • 1
  • 6
  • 23
0
votes
3 answers

Test file structure in groovy(Spock)

How to test created and expected file tree in groovy(Spock)? Right now I'm using Set where I specify paths which I expect to get and collecting actual paths in this way: Set getCreatedFilePaths(String root) { Set createFilePaths…
Max
  • 766
  • 9
  • 19
0
votes
1 answer

Convert PHP file tree array to array of relative paths

I need to take a multidimensional array that defines a file tree structure and convert it to an array of relative paths. I see plenty of answers on how to do the opposite. I need this: $file_tree = [ 'img', 'js' => [ 'src', 'min', …
0
votes
1 answer

How do I make functions from a package module immediately available to root application in Python3

Is there a way to import all modules within a package from the root level main application and have functions within the modules immediately available in Python 3? Here is an example file tree: +app |- __init__.py |- main.py |+ package |-…
Fergus
  • 437
  • 3
  • 11
0
votes
0 answers

php recursiv function not working with button

I wanted to do I file tree in PHP, and I can do it its simple full tree at once: function tree($path) { //scandir creates the array with all the files in the path folder $files = scandir($path); //going through each file or folder …
0
votes
1 answer

Displaying images by relative path in Node.js

I am building my first Node.js MVC app (native node, not using Express) and having trouble displaying images from my html files via relative their paths. I'll spare you my server.js and router.js code, but here is my controller code which is…
yevg
  • 1,846
  • 9
  • 34
  • 70
0
votes
1 answer

How to organize a rails app using nosql

I'm trying to create a Ruby on Rails app and I have recently started using NoSQL databases to store the data. However, I'm not sure how to organize the database files within the file tree. For instance, is the code for NoSQL only supposed to be put…
metaco57
  • 155
  • 3
  • 15
0
votes
2 answers

Parse many paths in the file tree object. Is there an efficient algorithm?

My code requires creation the file tree of the many file paths as dir1/file1 dir1/dir2/file2 dir1/dir2/file3 FileTree object visualization example: dir1 |_file1 |_dir2 |_file2 |_file3 This tree is used for torrent content files visualization…
proninyaroslav
  • 720
  • 2
  • 7
  • 19
0
votes
1 answer

jQueryFileTree How to clear instance, reinstantiate new instance or refresh

I'm using jQuery FileTree. After a file upload via javascript ajax (old school javascript xmlhttp request, not jQuery), I invoke the fileTree using the following code: $('#jstree').fileTree({ script: '/ajax/file_tree2/' + path, …
TARKUS
  • 2,170
  • 5
  • 34
  • 52
0
votes
2 answers

Using Java's file tree system to get only files and folders not subdirectories

So I have to use the Java file tree system because .listfiles files is for some reason incredibly slow going through a remote network. However all the Java file tree system examples list all the files in the subdirectories, severely slowing down the…
Brandan B
  • 464
  • 2
  • 6
  • 21
0
votes
1 answer

JavaScript filetree with relation

I am looking for a JavaScript method or a framework to achieve this: So in concrete words I like to have a tree structure same like the one in the Windows Explorer (where you can expand and collapse nodes) and on the right side you should be able…
marius
  • 1,118
  • 1
  • 18
  • 38
0
votes
2 answers

Creating A Filetree from a directory with Json.net LINQ

With the following code: static void Main(string[] args) { JObject fileSystemTree = CreateFileSystemJsonTree("C:/DirectoryTree"); Console.WriteLine(fileSystemTree); Console.WriteLine("------"); // // …
user3594395
  • 181
  • 4
  • 7
0
votes
1 answer

Way to bind data from parent scope to element in node in angular tree control?

Working on adding a drag and drop functionality to angular-tree-control: https://github.com/wix/angular-tree-control I am trying to bind data from the parent scope to an element I have made in the template for each node. However, the node's isolated…
0
votes
1 answer

How do I use SimpleFileVisitor in Java to find a file name whose encoding may vary?

I'm using SimpleFileVisitor to search for a file. It works fine on Windows and Linux. However when I try using it on Unix like operating systems It doesn't work as expected. I would get errors like this: java.nio.file.NoSuchFileException: …
M. A. Kishawy
  • 5,001
  • 11
  • 47
  • 72
0
votes
2 answers

how to configure root folder for jquery file tree?

I used the following code for configuring my jquery file tree.