-4

How can I get all the file names under one file folder? and foreach all the file names? using gremlin command

Jeff
  • 117
  • 10
  • 2
    SO is not a code-for-hire service. What have you tried? Where is your code? –  Aug 15 '17 at 15:45

1 Answers1

3

Gremlin is a graph traversal language. It doesn't have specific commands for reading the file system. You would just use the features of your programming language to do that. With Groovy, you could just do:

gremlin> new File("data").eachFile(groovy.io.FileType.FILES) { println it.name }
tinkerpop-modern.json
tinkerpop-classic.kryo
...
script-input.groovy
stephen mallette
  • 45,298
  • 5
  • 67
  • 135
  • 2
    There's a lot of resources at http://tinkerpop.apache.org/ but start with http://tinkerpop.apache.org/docs/current/tutorials/getting-started/ and http://tinkerpop.apache.org/docs/current/tutorials/the-gremlin-console/ – stephen mallette Aug 16 '17 at 10:53