Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort #86

Open
SpyrosMourelatos opened this issue Apr 26, 2021 · 2 comments
Open

Sort #86

SpyrosMourelatos opened this issue Apr 26, 2021 · 2 comments

Comments

@SpyrosMourelatos
Copy link

I am thinking about making a pr for adding some sort options ,e.g. sort by date or maybe sort by name(which most of the times happens but due to this issue it is not guaranteed to happen).After all the change will not be more than ten lines and a bit of documentation maybe something like :

try {
		dirData = FS.readdirSync(path);
	} 

goes to :

try{
dirData=FS.readdirSync(path);
if(options.sorted==="name")
    dirData.sort()
else if(options.sorted==="date")
   dirData.sort(dataComparer(a,b))
}

Any thoughts?

@mihneadb
Copy link
Owner

mihneadb commented May 4, 2021

Technically it could be done, of course. Not sure of its value. Do you have a need for this? Is it too much overhead to post-process the results and sort them?

@aolsx
Copy link

aolsx commented Oct 16, 2021

+1
Electron APP
sort directory > [name ] > file > [name]

Need this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants