score:7
Accepted answer
There is method getFile(relateivePath: String): File
on Play
object and also in the Application
class which returns file relative to application root directory. In your case:
Play.getFile("public/images")
return File
object, which represent public/images/
directory. You can call list
or listFiles
on it to get contents of the directory.
Source: stackoverflow.com
Related Query
- How to list out all the files in the public/images directory in a Play Framework 2 Scala application?
- How to show images using Play framework and Scala in the view page
- How can one list all csv files in an HDFS location within the Spark Scala shell?
- How to list the path of files inside Hdfs directory and subdirectory?
- How do you list all files in the Resources folder (java/scala)
- Using Gradle, how can I list just the JSON library of the Play framework as a dependency?
- How to process all the files in a directory parallelly without reading into a single dataframe spark?
- How to list out all the deployed versions in activiti explorer
- How do I list all files in a subdirectory in scala?
- how do I get sbt to gather all the jar files my code depends on into one place?
- How to check if list contains all the same values?
- How do I find the absolute path to a Play Framework app?
- How to list all the mount points in Azure Databricks?
- Scala - Iterator over all the lines in the files in a directory
- How to improve the error message readability returned from JsError.toFlatJson or JsError.toJson in Play framework 2.x?
- How to return all positives and the first negative number in a list using functional programming?
- How do you change the Play 2.1! Framework session cookie name
- Play Framework 2.1: Scala: how to get the whole base url (including protocol)?
- How to make Spark session read all the files recursively?
- How to copy some files to the build target directory with SBT?
- How to reference to the standard ActorSystem of play framework 2?
- How to add a prefix to all my routes in Play Framework 2?
- Scala Play - How to convert a list of Scala Strings into an Array of javascript Strings (avoiding the " issue)?
- How to get the list of all test?
- How to get list of all Route URL strings in play framework?
- How i can integrate Apache Spark with the Play Framework to display predictions in real time?
- How to use the Play Framework with Google App Engine with locally installed Java 7?
- How do you print out filled in Anorm SQL statements in Play framework
- How to parse json list or array in scala for play framework 2.2
- how to create a List in play framework 2 scala templates
More Query from same tag
- How to use foreachPartition in Spark 2.2 to avoid Task Serialization error
- Work on list of tuples in Scala - part 4
- Using a trait name as a logger name
- Scala unit test to check for constant value
- Using Apache Camel with Amazon AWS
- Extracting logic from the akka-http routing class and create a method for each REST path
- Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2
- Datetime: Calcul Hours in days
- SBT Set javac max heap
- String Containing Exact Substring from Substring List
- java.lang.ClassNotFoundException in scala program
- How would you write a method that takes an optional inner function
- How to abstract over a second type parameter when defining functors?
- How to know type of Map value Map("key->"value") in Scala?
- How to properly combine List[M[List[A]]] into M[List[A]] if M is a monad?
- AWS credentials not found when using spark/scal app to access s3
- Is it safe to use a concurrenthashmap that is shared with 100K actors?
- Is it safe to use AtomicBoolean for database locking in Scala/Java?
- No Encoder found error for a nested Java class
- scala: Adding attributes (odd and even rows) to xml table
- Play! 2.0 console in Intellij IDEA won't work
- Akka http testkit, how to test streaming response timing
- How to instruct sbt 0.11.x which source files contain tests
- Functional languages targeting the LLVM
- AWS GLUE: Cassandra connection using SSL is not working
- Spark HashingTF result explanation
- Spark Converting JavaDStream<String> method to JavaPairDStream<String, String> method
- Dynamic (down)casting in Scala
- Conditional join filtering based on row value
- Akka HTTP Redirect Error