mirror of
https://github.com/status-im/react-native-fs.git
synced 2025-03-01 07:20:33 +00:00
This changeset includes most of the react-native-fs functionality working for UWP. Some notable missing features are: * all of the `Assets` APIs (e.g., `readDirAssets`, `existsAssets`, etc.) that are Android specific * the `pathForBundle` and `pathForGroup` APIs that are iOS specific * the `uploadFiles` API, which just has not yet been implemented.
54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using ReactNative.Bridge;
|
|
using ReactNative.Modules.Core;
|
|
using ReactNative.UIManager;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace RNFS
|
|
{
|
|
/// <summary>
|
|
/// Package defining core framework modules (e.g., <see cref="UIManagerModule"/>).
|
|
/// It should be used for modules that require special integration with
|
|
/// other framework parts (e.g., with the list of packages to load view
|
|
/// managers from).
|
|
/// </summary>
|
|
public class RNFSPackage : IReactPackage
|
|
{
|
|
/// <summary>
|
|
/// Creates the list of native modules to register with the react
|
|
/// instance.
|
|
/// </summary>
|
|
/// <param name="reactContext">The react application context.</param>
|
|
/// <returns>The list of native modules.</returns>
|
|
public IReadOnlyList<INativeModule> CreateNativeModules(ReactContext reactContext)
|
|
{
|
|
return new List<INativeModule>
|
|
{
|
|
new RNFSManager(reactContext),
|
|
};
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates the list of JavaScript modules to register with the
|
|
/// react instance.
|
|
/// </summary>
|
|
/// <returns>The list of JavaScript modules.</returns>
|
|
public IReadOnlyList<Type> CreateJavaScriptModulesConfig()
|
|
{
|
|
return new List<Type>(0);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates the list of view managers that should be registered with
|
|
/// the <see cref="UIManagerModule"/>.
|
|
/// </summary>
|
|
/// <param name="reactContext">The react application context.</param>
|
|
/// <returns>The list of view managers.</returns>
|
|
public IReadOnlyList<IViewManager> CreateViewManagers(
|
|
ReactContext reactContext)
|
|
{
|
|
return new List<IViewManager>(0);
|
|
}
|
|
}
|
|
}
|