mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
update filestream support, unfinished
This commit is contained in:
parent
61c7200264
commit
3fe67bac2d
33
CS2JLibrary/NetFramework/System/IO/FileAccess.xml
Normal file
33
CS2JLibrary/NetFramework/System/IO/FileAccess.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Enum xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>CS2JNet.System.IO.FileAccess</Import>
|
||||
</Imports>
|
||||
<Java>FileAccess</Java>
|
||||
<Name>System.IO.FileAccess</Name>
|
||||
<Inherits>
|
||||
<Type>System.Enum</Type>
|
||||
</Inherits>
|
||||
<Members>
|
||||
<Member>
|
||||
<Java>${this:16}.Read</Java>
|
||||
<Name>Read</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.Write</Java>
|
||||
<Name>Write</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.ReadWrite</Java>
|
||||
<Name>ReadWrite</Name>
|
||||
</Member>
|
||||
</Members>
|
||||
</Enum>
|
45
CS2JLibrary/NetFramework/System/IO/FileMode.xml
Normal file
45
CS2JLibrary/NetFramework/System/IO/FileMode.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
This file is
|
||||
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn.com)
|
||||
|
||||
-->
|
||||
<Enum xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>CS2JNet.System.IO.FileMode</Import>
|
||||
</Imports>
|
||||
<Java>FileMode</Java>
|
||||
<Name>System.IO.FileMode</Name>
|
||||
<Inherits>
|
||||
<Type>System.Enum</Type>
|
||||
</Inherits>
|
||||
<Members>
|
||||
<Member>
|
||||
<Java>${this:16}.CreateNew</Java>
|
||||
<Name>CreateNew</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.Create</Java>
|
||||
<Name>Create</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.Open</Java>
|
||||
<Name>Open</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.OpenOrCreate</Java>
|
||||
<Name>OpenOrCreate</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.Truncate</Java>
|
||||
<Name>Truncate</Name>
|
||||
</Member>
|
||||
<Member>
|
||||
<Java>${this:16}.Append</Java>
|
||||
<Name>Append</Name>
|
||||
</Member>
|
||||
</Members>
|
||||
</Enum>
|
@ -9,9 +9,9 @@
|
||||
-->
|
||||
<Class xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:www.twigletsoftware.com:schemas:txtemplate:1:0">
|
||||
<Imports>
|
||||
<Import>java.io.*</Import>
|
||||
<Import>CS2JNet.System.IO.FileStreamSupport</Import>
|
||||
</Imports>
|
||||
<Java>OutputStream</Java>
|
||||
<Java>FileStreamSupport</Java>
|
||||
<Name>System.IO.FileStream</Name>
|
||||
<Uses />
|
||||
<Inherits>
|
||||
@ -22,7 +22,28 @@
|
||||
<Properties />
|
||||
<Events />
|
||||
<Indexers />
|
||||
<Constructors />
|
||||
<Constructors>
|
||||
<Constructor>
|
||||
<Imports>
|
||||
<Import>CS2JNet.System.IO.FileStreamSupport</Import>
|
||||
</Imports>
|
||||
<Java>new FileStreamSupport(${path}, ${mode}, ${access})</Java>
|
||||
<Params>
|
||||
<Param>
|
||||
<Type>System.String</Type>
|
||||
<Name>path</Name>
|
||||
</Param>
|
||||
<Param>
|
||||
<Type>System.IO.FileMode</Type>
|
||||
<Name>mode</Name>
|
||||
</Param>
|
||||
<Param>
|
||||
<Type>System.IO.FileAccess</Type>
|
||||
<Name>access</Name>
|
||||
</Param>
|
||||
</Params>
|
||||
</Constructor>
|
||||
</Constructors>
|
||||
<Fields />
|
||||
<Casts />
|
||||
<UnaryOps />
|
||||
|
26
CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java
Normal file
26
CS2JLibrary/src/CS2JNet/System/IO/FileAccess.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Author(s):
|
||||
|
||||
Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
*/
|
||||
|
||||
package CS2JNet.System.IO;
|
||||
|
||||
public enum FileAccess {
|
||||
Read, Write, ReadWrite
|
||||
}
|
26
CS2JLibrary/src/CS2JNet/System/IO/FileMode.java
Normal file
26
CS2JLibrary/src/CS2JNet/System/IO/FileMode.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Author(s):
|
||||
|
||||
Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
*/
|
||||
|
||||
package CS2JNet.System.IO;
|
||||
|
||||
public enum FileMode {
|
||||
CreateNew, Create, Open, OpenOrCreate, Truncate, Append
|
||||
}
|
28
CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java
Executable file
28
CS2JLibrary/src/CS2JNet/System/IO/FileStreamSupport.java
Executable file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2007,2008,2009,2010 Rustici Software, LLC
|
||||
Copyright 2010,2011 Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Author(s):
|
||||
|
||||
Kevin Glynn (kevin.glynn@twigletsoftware.com)
|
||||
*/
|
||||
|
||||
package CS2JNet.System.IO;
|
||||
|
||||
|
||||
public class FileStreamSupport {
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user