13 questions
-2
votes
1
answer
231
views
Client-side Javascript: Create array of files in a directory [duplicate]
I'm trying to make a For Loop in javascript that for every number added, will correspond to a file in a folder which will then be added to a list. Is this possible? (code below, I'm sure that there ...
0
votes
0
answers
52
views
How to resume from previous failed iteration while traversing through a big nested directory in Python?
I am currently using os.walk to navigate through all subfolders and files in a massive Network drive directory, However, Whenever my VPN disconnects, The for loop fails. Next day when I re-run my code,...
0
votes
1
answer
324
views
os.listdir not accessing numerically labelled files in ascending order [duplicate]
We want the png files to be accessed as 15.png,45.png,75.png and so on. This is the code and the output we are getting
import os
keypts_labels=[]
class_list=os.listdir('dataset')
for name in ...
0
votes
2
answers
181
views
How do I copy this temporary char* variable into my struct for more permanent storage?
I'm trying to implement a thread pool, and I'm having quite the bit of trouble with getting the filepaths I'm supposed to work with to be more permanently stored than the temporary instance they're ...
3
votes
2
answers
1k
views
Implement sliding window on file lines in Python
I'm trying to implement a sliding/moving window approach on lines of a csv file using Python. Each line can have a column with a binary value yes or no. Basically, I want to rare yes noises. That ...
0
votes
1
answer
244
views
Function replacement of nftw
ALL,
According to this, ntfw is obsolete in POSIX.1-2008.
Is there a replacement of this function? Or I should use something else across the board?
TIA!
1
vote
2
answers
1k
views
Call a method after ThreadPool.QueueUserWorkItem finished
I'm working on a console application written in c#
The purpose of this app is to go through all drives and files and do something on them. But going through all files with a single thread is a time ...
0
votes
2
answers
2k
views
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 ...
0
votes
1
answer
143
views
Callback on successful completion of recursion
I am following Folder Drag Drop for folder upload.
function onDrop(e) {
e.preventDefault();
e.stopPropagation();
var items = e.dataTransfer.items;
for (var i=0; i<items.length; i++) {
...
2
votes
2
answers
7k
views
Using ftw() properly in c
I have the following in my code: (Coding in c)
ftw(argv[2], parseFile, 100)
argv[2] is a local directory path. For instance. argv[2] = "TestCases" and there is a testcases folder in the same ...
0
votes
2
answers
621
views
Python File Traversal
I am trying to create a function that takes in a the name of a root file then traverses through the directory and returns a list like this.
[["folder1",[
["subfolder1",[
"file1",
"...
3
votes
4
answers
8k
views
Reasonably faster way to traverse a directory tree in Python?
Assuming that the given directory tree is of reasonable size: say an open source project like Twisted or Python, what is the fastest way to traverse and iterate over the absolute path of all files/...
10
votes
9
answers
9k
views
Looking for File Traversal Functions in Python that are Like Java's
In Java you can do File.listFiles() and receive all of the files in a directory. You can then easily recurse through directory trees.
Is there an analogous way to do this in Python?