You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Tim Lebedkov (JIRA)" <ji...@apache.org> on 2008/03/26 16:01:27 UTC
[jira] Created: (VFS-205) Please provide simple methods for
java.io.File <-> FileObject conversion
Please provide simple methods for java.io.File <-> FileObject conversion
------------------------------------------------------------------------
Key: VFS-205
URL: https://issues.apache.org/jira/browse/VFS-205
Project: Commons VFS
Issue Type: Improvement
Reporter: Tim Lebedkov
Please provide simple methods for java.io.File <-> FileObject conversion
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (VFS-205) Please provide simple methods for
java.io.File <-> FileObject conversion
Posted by "Ralph Goers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers resolved VFS-205.
-----------------------------
Resolution: Won't Fix
The documentation for File indicates it will throw an exception if the url contains a scheme other than file:. Furthermore, FileInputStream uses native methods to access the file data on disk. Attempting to use a File object based on the FileObject class would be doomed to fail. Since FileReader uses a FileInputStream internally it would also fail.
> Please provide simple methods for java.io.File <-> FileObject conversion
> ------------------------------------------------------------------------
>
> Key: VFS-205
> URL: https://issues.apache.org/jira/browse/VFS-205
> Project: Commons VFS
> Issue Type: Improvement
> Reporter: Tim Lebedkov
>
> Please provide simple methods for java.io.File <-> FileObject conversion
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-205) Please provide simple methods for
java.io.File <-> FileObject conversion
Posted by "Ralph Goers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675634#action_12675634 ]
Ralph Goers commented on VFS-205:
---------------------------------
While this would be nice, java.io.File only supports disk-based objects. File(uri) will throw an exception if the scheme is anything other than file:.
> Please provide simple methods for java.io.File <-> FileObject conversion
> ------------------------------------------------------------------------
>
> Key: VFS-205
> URL: https://issues.apache.org/jira/browse/VFS-205
> Project: Commons VFS
> Issue Type: Improvement
> Reporter: Tim Lebedkov
>
> Please provide simple methods for java.io.File <-> FileObject conversion
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (VFS-205) Please provide simple methods for
java.io.File <-> FileObject conversion
Posted by "Ralph Goers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralph Goers updated VFS-205:
----------------------------
Comment: was deleted
> Please provide simple methods for java.io.File <-> FileObject conversion
> ------------------------------------------------------------------------
>
> Key: VFS-205
> URL: https://issues.apache.org/jira/browse/VFS-205
> Project: Commons VFS
> Issue Type: Improvement
> Reporter: Tim Lebedkov
>
> Please provide simple methods for java.io.File <-> FileObject conversion
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-205) Please provide simple methods for
java.io.File <-> FileObject conversion
Posted by "James Carman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675648#action_12675648 ]
James Carman commented on VFS-205:
----------------------------------
There is a utility method for converting File -> FileObject, just not back the other way (for the reasons outlined by Ralph). If you want everything to be a java.io.File object, why are you using VFS? Also, you can copy any FileObject to a File using the VFS API. That's what we do. We copy the FileObject's contents into a temp file and process it from there.
> Please provide simple methods for java.io.File <-> FileObject conversion
> ------------------------------------------------------------------------
>
> Key: VFS-205
> URL: https://issues.apache.org/jira/browse/VFS-205
> Project: Commons VFS
> Issue Type: Improvement
> Reporter: Tim Lebedkov
>
> Please provide simple methods for java.io.File <-> FileObject conversion
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.