Questions tagged [filewalker]

11 questions
2
votes
1 answer

loading object thats inside of an object into a html table

so i am trying to make a file manger in node.js and socket.io so every time the walker module detects a file or folder it emits an event to the client that puts it in the table using this large function socket.on('loadItem', function(type, name,…
Nik Hendricks
  • 244
  • 2
  • 6
  • 29
1
vote
1 answer

Iterate through a folder just once JAVA Files.walk

I am stuck regarding reading only the directories. I want to iterate a folder and see all the subdirectories that the folder contains. If the subdirectory contains txt files, then send it to the "DistributionFolder" class which will read that…
ilie alexandru
  • 207
  • 2
  • 9
1
vote
1 answer

FileVisitor to replace existing files

I need to replace file from one directory to another directory. I have searched in net and i found efficient solution to replace files . I am using Files.walkFileTree to traverse the directory and replacing file. Before replacing file i am checking…
Roshan
  • 79
  • 2
  • 11
1
vote
0 answers

Resizing hundreds of JPG's using node and gm

I've got an image folder with about 100 sub-folders and in each there are about 5 JPGs. I'm trying to use node to loop through all the images and resize them so the smallest dimension is 1200. They are a mix of portrait and landscape and the…
Nick Middleweek
  • 1,049
  • 2
  • 11
  • 19
1
vote
0 answers

JavaFX Scala File-TreeView: read out 2 levels

I want to implement a file browser in scala with a GUI made with JavaFx. Therefore i use a TreeView to represent the Tree. This code only reads out one level from the tree whenever i click on to one item (performance reasons) but the treeview does…
clagger
  • 33
  • 5
0
votes
1 answer

Find first occurrence of a file name in project in Kotlin

I'd like to be able to search for "someFileName" file in a project that may contain more than one, starting at the root directory, and then stopping when I encounter the first one. Something like a FileTreeWalk that exits early based on some…
Maldz
  • 23
  • 2
  • 6
0
votes
0 answers

How to use _Assertions object in Kotlin?

I'm trying to recreate a file walker (like File('/path').walk()) for Android's Storage Access Framework. This is a snippet from the original FileTreeWalk: private abstract class DirectoryState(rootDir: File) : WalkState(rootDir) { init { …
Minh Nghĩa
  • 854
  • 1
  • 11
  • 28
0
votes
1 answer

Is there any directory walker in ts / js using an async iterator?

I found plenty of walkers on npm but none is using an asynchronous iterator. Most of them are either using a callback or a promise leading to memory leaks on huge directories. Is there any recent library using the following pattern: async function*…
Flavien Volken
  • 19,196
  • 12
  • 100
  • 133
0
votes
1 answer

Exit stream manually before `on('exit')` event is reached while using filewalker

I am using filewalker npm package to walk through files. I am trying to limit amount of files that would be read in stream by exiting stream once a specific condition is met. (e.g. streamed 5 file paths) rather than waiting exit event. (This is due…
Kunok
  • 8,089
  • 8
  • 48
  • 89
0
votes
1 answer

Async operation on each file with npm filewalker

I'm using Filewalker to traverse through a directory. However, for each file, I'd like to perform an asynchronous operation. How do I ensure that done is fired only after all the operations are complete? filewalker('.') .on('file', function(p, s)…
Shrihari
  • 105
  • 2
  • 10
0
votes
2 answers

How to walk the directory tree of huge directory and ignore files

I need to walk a directory on a network drive and create a map of child to parent in the hierarchy. One representative directory is 6 Terrabytes, has 900,000 files and 900 folders. I only care about the folders and not the files. For testing…
Jay Askren
  • 10,282
  • 14
  • 53
  • 75