$declaration constant

BridgeClassDef const $declaration

Compile-time bridged class declaration for $File

Implementation

static const $declaration = BridgeClassDef(
    BridgeClassType($type, $extends: $FileSystemEntity.$type),
    constructors: {
      '': BridgeConstructorDef(
          BridgeFunctionDef(returns: BridgeTypeAnnotation($type), params: [
        BridgeParameter('path',
            BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false)
      ], namedParams: []))
    },
    methods: {
      'create': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
              CoreTypes.future, [BridgeTypeRef(CoreTypes.voidType)])),
          params: [],
          namedParams: [
            BridgeParameter('recursive',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
            BridgeParameter('exclusive',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'createSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
          params: [],
          namedParams: [
            BridgeParameter('recursive',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
            BridgeParameter('exclusive',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'rename': BridgeMethodDef(BridgeFunctionDef(
          returns:
              BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future, [$type])),
          params: [
            BridgeParameter('newPath', BridgeTypeAnnotation($type), false)
          ],
          namedParams: [])),
      'renameSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation($type),
          params: [
            BridgeParameter('newPath', BridgeTypeAnnotation($type), false)
          ],
          namedParams: [])),
      'openRead': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.stream, [
            BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])
          ])),
          params: [
            BridgeParameter(
                'start',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
                    nullable: true),
                true),
            BridgeParameter(
                'end',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
                    nullable: true),
                true),
          ],
          namedParams: [])),
      'openWrite': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(IoTypes.ioSink)),
          params: [],
          namedParams: [
            //BridgeParameter('mode', BridgeTypeAnnotation(BridgeTypeRef(IoTypes.fileModeType)), true),
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
          ])),
      'length': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.int)],
          )),
          params: [],
          namedParams: [])),
      'lengthSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)),
          params: [],
          namedParams: [])),
      'lastAccessed': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.dateTime)],
          )),
          params: [],
          namedParams: [])),
      'lastAccessedSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
          params: [],
          namedParams: [])),
      'lastModified': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.dateTime)],
          )),
          params: [],
          namedParams: [])),
      'lastModifiedSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
          params: [],
          namedParams: [])),
      'setLastAccessed': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.voidType)],
          )),
          params: [
            BridgeParameter(
                'time',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
                false)
          ],
          namedParams: [])),
      'setLastAccessedSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
          params: [
            BridgeParameter(
                'time',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
                false)
          ],
          namedParams: [])),
      'setLastModified': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.voidType)],
          )),
          params: [
            BridgeParameter(
                'time',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
                false)
          ],
          namedParams: [])),
      'setLastModifiedSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
          params: [
            BridgeParameter(
                'time',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dateTime)),
                false)
          ],
          namedParams: [])),
      'readAsString': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.string)],
          )),
          params: [],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
          ])),
      'readAsStringSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)),
          params: [],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
          ])),
      'readAsBytes': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [
              BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])
            ],
          )),
          params: [],
          namedParams: [])),
      'readAsBytesSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(
              BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])),
          params: [],
          namedParams: [])),
      'writeAsString': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.voidType)],
          )),
          params: [
            BridgeParameter('contents',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false)
          ],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
            //BridgeParameter('mode', BridgeTypeAnnotation(BridgeTypeRef(IoTypes.fileModeType)), true),
            BridgeParameter('flush',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'writeAsStringSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
          params: [
            BridgeParameter('contents',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false)
          ],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
            //BridgeParameter('mode', BridgeTypeAnnotation(BridgeTypeRef(IoTypes.fileModeType)), true),
            BridgeParameter('flush',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'writeAsBytes': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [BridgeTypeRef(CoreTypes.voidType)],
          )),
          params: [
            BridgeParameter(
                'bytes',
                BridgeTypeAnnotation(BridgeTypeRef(
                    CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])),
                false)
          ],
          namedParams: [
            //BridgeParameter('mode', BridgeTypeAnnotation(BridgeTypeRef(IoTypes.fileModeType)), true),
            BridgeParameter('flush',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'writeAsBytesSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
          params: [
            BridgeParameter(
                'bytes',
                BridgeTypeAnnotation(BridgeTypeRef(
                    CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])),
                false)
          ],
          namedParams: [
            //BridgeParameter('mode', BridgeTypeAnnotation(BridgeTypeRef(IoTypes.fileModeType)), true),
            BridgeParameter('flush',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true),
          ])),
      'readAsLines': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
            CoreTypes.future,
            [
              BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.string)])
            ],
          )),
          params: [],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
          ])),
      'readAsLinesSync': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(
              CoreTypes.list, [BridgeTypeRef(CoreTypes.string)])),
          params: [],
          namedParams: [
            //BridgeParameter('encoding', BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.encodingType)), true),
          ])),
    },
    wrap: true);