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

Add support for loading resources from classpath to scala.io.Source #7514

Closed
scabug opened this issue May 24, 2013 · 7 comments
Closed

Add support for loading resources from classpath to scala.io.Source #7514

scabug opened this issue May 24, 2013 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented May 24, 2013

Add support for loading Source from classpath. I use this feature a lot in Spring. Here is Spring Version:

http://static.springsource.org/spring/docs/3.2.x/javadoc-api/org/springframework/core/io/ClassPathResource.html

i propose to add function scala.io.Source.fromClassPath()

@scabug
Copy link
Author

scabug commented May 24, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7514?orig=1
Reporter: Radim Kolar (hsn)
Affected Versions: 2.10.1

@scabug
Copy link
Author

scabug commented May 24, 2013

Stephen Compall (s11001001) said:
How would this improve matters over the existing Source.fromURL?

@scabug
Copy link
Author

scabug commented May 25, 2013

Radim Kolar (hsn) said:
fromURL supports spring like "classpath:package.resource" ?

@scabug
Copy link
Author

scabug commented May 25, 2013

@retronym said:
Nope, it doesn't. I agree that this is a useful enhancement.

@scabug
Copy link
Author

scabug commented May 27, 2013

Radim Kolar (hsn) said:
My most used way to use that is with ClassPathResource(String path, Class<?> clazz)

It creates classpathresource with name relative to supplied class

@scabug
Copy link
Author

scabug commented Jun 17, 2015

@SethTisue said:
scala/scala#4538 was submitted by Eugene Dzhurinsky, but against 2.11. a new PR could be submitted against 2.12

@scabug
Copy link
Author

scabug commented Jul 7, 2015

@adriaanm said:
scala/scala#4561

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

No branches or pull requests

2 participants