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

URIs in file names #785

Closed
modelica-trac-importer opened this issue Jan 14, 2017 · 4 comments
Closed

URIs in file names #785

modelica-trac-importer opened this issue Jan 14, 2017 · 4 comments
Assignees
Labels
enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks
Milestone

Comments

@modelica-trac-importer
Copy link

Reported by fcasella on 25 Jul 2012 20:58 UTC
Table-based functions and signal generators can use files as data sources. Currently, the pathname is either absolute, or relative to the current working directory. It is therefore not possible to reference pathnames relative to the library base path, which is essential for portability across different PCs and filesystems.

The proposal is to allow modelica:// URIs in filenames, both in the Table components and in all the functions dealing with files in the Modelica.Utilities package.


Migrated-From: https://trac.modelica.org/Modelica/ticket/785

@modelica-trac-importer modelica-trac-importer added enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by dietmarw on 26 Jul 2012 06:12 UTC
This issue is also discussed as part of #439 and #443.

@modelica-trac-importer
Copy link
Author

Comment by otter on 4 Oct 2012 12:34 UTC
Fixed in 3c0057c98c16b7688cf857040b7f5b8cee670109 by introducing a tool specific function "loadResource" in ModelicaServices and calling this function from the table models (the file names can now be given as an URI). Additionally, URI support is added for functions that treat a file as one complete entity, in particular:

  • Modelica.Utilities.Streams.readFile
  • Modelica.Utilities.Examples.readRealParameterModel

In all other cases, the user has to explicitly first transform the URI name to an absolute path name with new function

  • Modelica.Utilities.Files.loadResource

The reason is that, e.g., if a function like print or readLine would accept URIs, then for every call the absolute path name would need to be determined.

@modelica-trac-importer
Copy link
Author

Changelog removed by otter on 4 Oct 2012 12:34 UTC

@modelica-trac-importer
Copy link
Author

Modified by dietmarw on 18 Dec 2012 15:27 UTC

@modelica-trac-importer modelica-trac-importer added this to the MSL3.2.1 milestone Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement L: Blocks Issue addresses Modelica.Blocks
Projects
None yet
Development

No branches or pull requests

2 participants