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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

scabug commented May 24, 2013

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

@scabug

This comment has been minimized.

Copy link

scabug commented May 25, 2013

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

@scabug

This comment has been minimized.

Copy link

scabug commented May 25, 2013

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

@scabug

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

scabug commented Jul 7, 2015

@scabug scabug closed this Jul 7, 2015

@scabug scabug added this to the 2.12.0-M2 milestone Apr 7, 2017

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