You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pu...@apache.org on 2021/07/11 12:56:28 UTC
[royale-asjs] branch develop updated: Added FileMode.as and
FileStream.as in MXRoyale
This is an automated email from the ASF dual-hosted git repository.
pushminakazi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new bd0a35d Added FileMode.as and FileStream.as in MXRoyale
bd0a35d is described below
commit bd0a35d683acd268d470c5cbe792415186f92581
Author: pashminakazi <pa...@gmail.com>
AuthorDate: Sun Jul 11 05:56:15 2021 -0700
Added FileMode.as and FileStream.as in MXRoyale
---
.../MXRoyale/src/main/royale/MXRoyaleClasses.as | 3 +
.../src/main/royale/mx/filesystem/FileMode.as | 37 +++++++
.../src/main/royale/mx/filesystem/FileStream.as | 121 +++++++++++++++++++++
3 files changed, 161 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
index 2cac223..da7c444 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/MXRoyaleClasses.as
@@ -398,6 +398,9 @@ internal class MXRoyaleClasses
import mx.data.EncryptedLocalStore; EncryptedLocalStore;
import mx.filesystem.File; File;
import mx.system.Capabilities; Capabilities;
+ import mx.filesystem.FileMode; FileMode;
+ import mx.filesystem.FileStream; FileStream;
+
}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileMode.as b/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileMode.as
new file mode 100644
index 0000000..4d3b689
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileMode.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package mx.filesystem
+{
+
+ public class FileMode
+ {
+ public function FileMode()
+ {
+ super();
+ }
+
+ public static const APPEND:String = "append";
+ public static const READ:String = "read";
+ public static const UPDATE:String = "update";
+ public static const WRITE:String = "write";
+ }
+
+}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileStream.as b/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileStream.as
new file mode 100644
index 0000000..242f5bf
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/filesystem/FileStream.as
@@ -0,0 +1,121 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package mx.filesystem
+{
+
+
+import org.apache.royale.events.EventDispatcher;
+import mx.utils.ByteArray;
+
+/**
+ * Dispatched when the component has finished its construction
+ * and has all initialization properties set.
+ *
+ * <p>After the initialization phase, properties are processed, the component
+ * is measured, laid out, and drawn, after which the
+ * <code>creationComplete</code> event is dispatched.</p>
+ *
+ * @eventType = org.apache.royale.events.Event.CLOSE
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+[Event(name="close", type="org.apache.royale.events.Event")]
+
+/**
+ * Dispatched when the component has finished its construction
+ * and has all initialization properties set.
+ *
+ * <p>After the initialization phase, properties are processed, the component
+ * is measured, laid out, and drawn, after which the
+ * <code>creationComplete</code> event is dispatched.</p>
+ *
+ * @eventType = org.apache.royale.events.Event.COMPLETE
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+[Event(name="complete", type="org.apache.royale.events.Event")]
+
+/**
+ * Dispatched when the component has finished its construction
+ * and has all initialization properties set.
+ *
+ * <p>After the initialization phase, properties are processed, the component
+ * is measured, laid out, and drawn, after which the
+ * <code>creationComplete</code> event is dispatched.</p>
+ *
+ * @eventType = mx.events.IOErrorEvent.IO_ERROR
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+[Event(name="ioError", type="mx.events.IOErrorEvent")]
+
+/**
+ * Dispatched when the component has finished its construction
+ * and has all initialization properties set.
+ *
+ * <p>After the initialization phase, properties are processed, the component
+ * is measured, laid out, and drawn, after which the
+ * <code>creationComplete</code> event is dispatched.</p>
+ *
+ * @eventType = mx.events.ProgressEvent.PROGRESS
+ *
+ * @langversion 3.0
+ * @playerversion Flash 9
+ * @playerversion AIR 1.1
+ * @productversion Flex 3
+ */
+[Event(name="progress", type="mx.events.ProgressEvent")]
+
+
+ public class FileStream extends EventDispatcher
+ {
+ public function FileStream()
+ {
+ super();
+ }
+
+ public function close():void {
+ trace("close in FileStream is not implemented");
+ }
+
+ public function open(file:File, fileMode:String):void {
+ trace("open in FileStream is not implemented");
+ }
+
+ public function writeUTFBytes(value:String):void {
+ trace("writeUTFBytes in FileStream is not implemented");
+ }
+
+ public function writeBytes(bytes:ByteArray, offset:uint = 0, length:uint = 0):void {
+ trace("writeBytes in FileStream is not implemented");
+ }
+ }
+
+}