@aerokit/sdk 12.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +277 -0
- package/README.md +170 -0
- package/dist/cjs/bpm/deployer.js +57 -0
- package/dist/cjs/bpm/index.js +35 -0
- package/dist/cjs/bpm/process.js +636 -0
- package/dist/cjs/bpm/tasks.js +973 -0
- package/dist/cjs/bpm/values.js +82 -0
- package/dist/cjs/cache/cache.js +64 -0
- package/dist/cjs/cache/index.js +26 -0
- package/dist/cjs/cms/cmis.js +689 -0
- package/dist/cjs/cms/index.js +26 -0
- package/dist/cjs/component/decorators.js +126 -0
- package/dist/cjs/component/index.js +36 -0
- package/dist/cjs/core/configurations.js +110 -0
- package/dist/cjs/core/context.js +47 -0
- package/dist/cjs/core/env.js +45 -0
- package/dist/cjs/core/globals.js +54 -0
- package/dist/cjs/core/index.js +35 -0
- package/dist/cjs/db/dao.js +795 -0
- package/dist/cjs/db/database.js +904 -0
- package/dist/cjs/db/decorators.js +167 -0
- package/dist/cjs/db/index.js +72 -0
- package/dist/cjs/db/insert.js +51 -0
- package/dist/cjs/db/orm.js +245 -0
- package/dist/cjs/db/ormstatements.js +243 -0
- package/dist/cjs/db/procedure.js +112 -0
- package/dist/cjs/db/query.js +57 -0
- package/dist/cjs/db/repository.js +148 -0
- package/dist/cjs/db/sequence.js +59 -0
- package/dist/cjs/db/sql.js +516 -0
- package/dist/cjs/db/store.js +172 -0
- package/dist/cjs/db/translator.js +100 -0
- package/dist/cjs/db/update.js +43 -0
- package/dist/cjs/etcd/client.js +174 -0
- package/dist/cjs/etcd/index.js +26 -0
- package/dist/cjs/extensions/decorators.js +40 -0
- package/dist/cjs/extensions/extensions.js +108 -0
- package/dist/cjs/extensions/index.js +39 -0
- package/dist/cjs/git/client.js +277 -0
- package/dist/cjs/git/index.js +26 -0
- package/dist/cjs/http/client-async.js +224 -0
- package/dist/cjs/http/client.js +145 -0
- package/dist/cjs/http/decorators.js +76 -0
- package/dist/cjs/http/errors/ForbiddenError.js +41 -0
- package/dist/cjs/http/errors/ValidationError.js +41 -0
- package/dist/cjs/http/errors.js +26 -0
- package/dist/cjs/http/index.js +59 -0
- package/dist/cjs/http/request.js +281 -0
- package/dist/cjs/http/response.js +452 -0
- package/dist/cjs/http/rs/resource-common.js +32 -0
- package/dist/cjs/http/rs/resource-http-controller.js +306 -0
- package/dist/cjs/http/rs/resource-mappings.js +130 -0
- package/dist/cjs/http/rs/resource-method.js +218 -0
- package/dist/cjs/http/rs/resource.js +232 -0
- package/dist/cjs/http/rs.js +31 -0
- package/dist/cjs/http/session.js +124 -0
- package/dist/cjs/http/upload.js +144 -0
- package/dist/cjs/http/utils.js +106 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/indexing/index.js +29 -0
- package/dist/cjs/indexing/searcher.js +70 -0
- package/dist/cjs/indexing/writer.js +45 -0
- package/dist/cjs/integrations/index.js +26 -0
- package/dist/cjs/integrations/integrations.js +55 -0
- package/dist/cjs/io/bytes.js +101 -0
- package/dist/cjs/io/files.js +344 -0
- package/dist/cjs/io/image.js +43 -0
- package/dist/cjs/io/index.js +38 -0
- package/dist/cjs/io/streams.js +243 -0
- package/dist/cjs/io/zip.js +251 -0
- package/dist/cjs/job/decorators.js +40 -0
- package/dist/cjs/job/index.js +39 -0
- package/dist/cjs/job/scheduler.js +347 -0
- package/dist/cjs/junit/index.js +18 -0
- package/dist/cjs/junit/junit.js +67 -0
- package/dist/cjs/kafka/consumer.js +70 -0
- package/dist/cjs/kafka/index.js +29 -0
- package/dist/cjs/kafka/producer.js +70 -0
- package/dist/cjs/log/index.js +26 -0
- package/dist/cjs/log/logging.js +174 -0
- package/dist/cjs/mail/client.js +153 -0
- package/dist/cjs/mail/index.js +26 -0
- package/dist/cjs/messaging/consumer.js +83 -0
- package/dist/cjs/messaging/decorators.js +40 -0
- package/dist/cjs/messaging/index.js +42 -0
- package/dist/cjs/messaging/producer.js +81 -0
- package/dist/cjs/mongodb/client.js +627 -0
- package/dist/cjs/mongodb/dao.js +390 -0
- package/dist/cjs/mongodb/index.js +36 -0
- package/dist/cjs/net/decorators.js +40 -0
- package/dist/cjs/net/index.js +42 -0
- package/dist/cjs/net/soap.js +228 -0
- package/dist/cjs/net/websockets.js +151 -0
- package/dist/cjs/net/wrappers/onClose.js +2 -0
- package/dist/cjs/net/wrappers/onError.js +2 -0
- package/dist/cjs/net/wrappers/onMessage.js +2 -0
- package/dist/cjs/net/wrappers/onOpen.js +2 -0
- package/dist/cjs/pdf/index.js +26 -0
- package/dist/cjs/pdf/pdf.js +160 -0
- package/dist/cjs/platform/command.js +47 -0
- package/dist/cjs/platform/engines.js +70 -0
- package/dist/cjs/platform/index.js +47 -0
- package/dist/cjs/platform/lifecycle.js +49 -0
- package/dist/cjs/platform/os.js +51 -0
- package/dist/cjs/platform/problems.js +127 -0
- package/dist/cjs/platform/registry.js +319 -0
- package/dist/cjs/platform/repository.js +498 -0
- package/dist/cjs/platform/workspace.js +574 -0
- package/dist/cjs/qldb/index.js +26 -0
- package/dist/cjs/qldb/qldb.js +24 -0
- package/dist/cjs/rabbitmq/consumer.js +50 -0
- package/dist/cjs/rabbitmq/index.js +29 -0
- package/dist/cjs/rabbitmq/producer.js +38 -0
- package/dist/cjs/redis/client.js +190 -0
- package/dist/cjs/redis/index.js +26 -0
- package/dist/cjs/security/decorators.js +48 -0
- package/dist/cjs/security/index.js +40 -0
- package/dist/cjs/security/oauth.js +75 -0
- package/dist/cjs/security/user.js +88 -0
- package/dist/cjs/template/engines.js +139 -0
- package/dist/cjs/template/index.js +26 -0
- package/dist/cjs/utils/alphanumeric.js +107 -0
- package/dist/cjs/utils/base64.js +104 -0
- package/dist/cjs/utils/converter.js +78 -0
- package/dist/cjs/utils/digest.js +167 -0
- package/dist/cjs/utils/escape.js +160 -0
- package/dist/cjs/utils/hex.js +104 -0
- package/dist/cjs/utils/index.js +68 -0
- package/dist/cjs/utils/jsonpath.js +489 -0
- package/dist/cjs/utils/qrcode.js +41 -0
- package/dist/cjs/utils/url.js +82 -0
- package/dist/cjs/utils/utf8.js +61 -0
- package/dist/cjs/utils/uuid.js +48 -0
- package/dist/cjs/utils/xml.js +57 -0
- package/dist/dts/bpm/deployer.d.ts +29 -0
- package/dist/dts/bpm/index.d.ts +8 -0
- package/dist/dts/bpm/process.d.ts +433 -0
- package/dist/dts/bpm/tasks.d.ts +2022 -0
- package/dist/dts/bpm/values.d.ts +38 -0
- package/dist/dts/cache/cache.d.ts +30 -0
- package/dist/dts/cache/index.d.ts +2 -0
- package/dist/dts/cms/cmis.d.ts +413 -0
- package/dist/dts/cms/index.d.ts +2 -0
- package/dist/dts/component/decorators.d.ts +52 -0
- package/dist/dts/component/index.d.ts +2 -0
- package/dist/dts/core/configurations.d.ts +65 -0
- package/dist/dts/core/context.d.ts +19 -0
- package/dist/dts/core/env.d.ts +23 -0
- package/dist/dts/core/globals.d.ts +30 -0
- package/dist/dts/core/index.d.ts +8 -0
- package/dist/dts/db/dao.d.ts +8 -0
- package/dist/dts/db/database.d.ts +507 -0
- package/dist/dts/db/decorators.d.ts +89 -0
- package/dist/dts/db/index.d.ts +25 -0
- package/dist/dts/db/insert.d.ts +32 -0
- package/dist/dts/db/orm.d.ts +44 -0
- package/dist/dts/db/ormstatements.d.ts +4 -0
- package/dist/dts/db/procedure.d.ts +25 -0
- package/dist/dts/db/query.d.ts +48 -0
- package/dist/dts/db/repository.d.ts +64 -0
- package/dist/dts/db/sequence.d.ts +34 -0
- package/dist/dts/db/sql.d.ts +267 -0
- package/dist/dts/db/store.d.ts +138 -0
- package/dist/dts/db/translator.d.ts +26 -0
- package/dist/dts/db/update.d.ts +21 -0
- package/dist/dts/etcd/client.d.ts +92 -0
- package/dist/dts/etcd/index.d.ts +2 -0
- package/dist/dts/extensions/decorators.d.ts +11 -0
- package/dist/dts/extensions/extensions.d.ts +41 -0
- package/dist/dts/extensions/index.d.ts +4 -0
- package/dist/dts/git/client.d.ts +478 -0
- package/dist/dts/git/index.d.ts +2 -0
- package/dist/dts/http/client-async.d.ts +158 -0
- package/dist/dts/http/client.d.ts +180 -0
- package/dist/dts/http/decorators.d.ts +11 -0
- package/dist/dts/http/errors/ForbiddenError.d.ts +20 -0
- package/dist/dts/http/errors/ValidationError.d.ts +20 -0
- package/dist/dts/http/errors.d.ts +2 -0
- package/dist/dts/http/index.d.ts +16 -0
- package/dist/dts/http/request.d.ts +158 -0
- package/dist/dts/http/response.d.ts +281 -0
- package/dist/dts/http/rs/resource-common.d.ts +11 -0
- package/dist/dts/http/rs/resource-http-controller.d.ts +43 -0
- package/dist/dts/http/rs/resource-mappings.d.ts +70 -0
- package/dist/dts/http/rs/resource-method.d.ts +206 -0
- package/dist/dts/http/rs/resource.d.ts +126 -0
- package/dist/dts/http/rs.d.ts +4 -0
- package/dist/dts/http/session.d.ts +81 -0
- package/dist/dts/http/upload.d.ts +100 -0
- package/dist/dts/http/utils.d.ts +54 -0
- package/dist/dts/index.d.ts +0 -0
- package/dist/dts/indexing/index.d.ts +4 -0
- package/dist/dts/indexing/searcher.d.ts +47 -0
- package/dist/dts/indexing/writer.d.ts +22 -0
- package/dist/dts/integrations/index.d.ts +2 -0
- package/dist/dts/integrations/integrations.d.ts +118 -0
- package/dist/dts/io/bytes.d.ts +56 -0
- package/dist/dts/io/files.d.ts +261 -0
- package/dist/dts/io/image.d.ts +22 -0
- package/dist/dts/io/index.d.ts +10 -0
- package/dist/dts/io/streams.d.ts +172 -0
- package/dist/dts/io/zip.d.ts +178 -0
- package/dist/dts/job/decorators.d.ts +11 -0
- package/dist/dts/job/index.d.ts +4 -0
- package/dist/dts/job/scheduler.d.ts +250 -0
- package/dist/dts/junit/index.d.ts +1 -0
- package/dist/dts/junit/junit.d.ts +50 -0
- package/dist/dts/kafka/consumer.d.ts +48 -0
- package/dist/dts/kafka/index.d.ts +4 -0
- package/dist/dts/kafka/producer.d.ts +50 -0
- package/dist/dts/log/index.d.ts +2 -0
- package/dist/dts/log/logging.d.ts +102 -0
- package/dist/dts/mail/client.d.ts +90 -0
- package/dist/dts/mail/index.d.ts +2 -0
- package/dist/dts/messaging/consumer.d.ts +61 -0
- package/dist/dts/messaging/decorators.d.ts +11 -0
- package/dist/dts/messaging/index.d.ts +6 -0
- package/dist/dts/messaging/producer.d.ts +59 -0
- package/dist/dts/mongodb/client.d.ts +367 -0
- package/dist/dts/mongodb/dao.d.ts +24 -0
- package/dist/dts/mongodb/index.d.ts +2 -0
- package/dist/dts/net/decorators.d.ts +11 -0
- package/dist/dts/net/index.d.ts +6 -0
- package/dist/dts/net/soap.d.ts +115 -0
- package/dist/dts/net/websockets.d.ts +100 -0
- package/dist/dts/net/wrappers/onClose.d.ts +0 -0
- package/dist/dts/net/wrappers/onError.d.ts +0 -0
- package/dist/dts/net/wrappers/onMessage.d.ts +0 -0
- package/dist/dts/net/wrappers/onOpen.d.ts +0 -0
- package/dist/dts/pdf/index.d.ts +2 -0
- package/dist/dts/pdf/pdf.d.ts +72 -0
- package/dist/dts/platform/command.d.ts +41 -0
- package/dist/dts/platform/engines.d.ts +35 -0
- package/dist/dts/platform/index.d.ts +16 -0
- package/dist/dts/platform/lifecycle.d.ts +22 -0
- package/dist/dts/platform/os.d.ts +23 -0
- package/dist/dts/platform/problems.d.ts +114 -0
- package/dist/dts/platform/registry.d.ts +227 -0
- package/dist/dts/platform/repository.d.ts +354 -0
- package/dist/dts/platform/workspace.d.ts +421 -0
- package/dist/dts/qldb/index.d.ts +2 -0
- package/dist/dts/qldb/qldb.d.ts +1 -0
- package/dist/dts/rabbitmq/consumer.d.ts +25 -0
- package/dist/dts/rabbitmq/index.d.ts +4 -0
- package/dist/dts/rabbitmq/producer.d.ts +15 -0
- package/dist/dts/redis/client.d.ts +134 -0
- package/dist/dts/redis/index.d.ts +2 -0
- package/dist/dts/security/decorators.d.ts +4 -0
- package/dist/dts/security/index.d.ts +5 -0
- package/dist/dts/security/oauth.d.ts +39 -0
- package/dist/dts/security/user.d.ts +51 -0
- package/dist/dts/template/engines.d.ts +98 -0
- package/dist/dts/template/index.d.ts +2 -0
- package/dist/dts/utils/alphanumeric.d.ts +39 -0
- package/dist/dts/utils/base64.d.ts +48 -0
- package/dist/dts/utils/converter.d.ts +44 -0
- package/dist/dts/utils/digest.d.ts +50 -0
- package/dist/dts/utils/escape.d.ts +110 -0
- package/dist/dts/utils/hex.d.ts +48 -0
- package/dist/dts/utils/index.d.ts +23 -0
- package/dist/dts/utils/jsonpath.d.ts +22 -0
- package/dist/dts/utils/qrcode.d.ts +16 -0
- package/dist/dts/utils/url.d.ts +50 -0
- package/dist/dts/utils/utf8.d.ts +33 -0
- package/dist/dts/utils/uuid.d.ts +21 -0
- package/dist/dts/utils/xml.d.ts +22 -0
- package/dist/esm/bpm/deployer.mjs +38 -0
- package/dist/esm/bpm/index.mjs +15 -0
- package/dist/esm/bpm/process.mjs +617 -0
- package/dist/esm/bpm/tasks.mjs +954 -0
- package/dist/esm/bpm/values.mjs +63 -0
- package/dist/esm/cache/cache.mjs +45 -0
- package/dist/esm/cache/index.mjs +6 -0
- package/dist/esm/cms/cmis.mjs +660 -0
- package/dist/esm/cms/index.mjs +6 -0
- package/dist/esm/component/decorators.mjs +107 -0
- package/dist/esm/component/index.mjs +6 -0
- package/dist/esm/core/configurations.mjs +91 -0
- package/dist/esm/core/context.mjs +28 -0
- package/dist/esm/core/env.mjs +26 -0
- package/dist/esm/core/globals.mjs +35 -0
- package/dist/esm/core/index.mjs +15 -0
- package/dist/esm/db/dao.mjs +775 -0
- package/dist/esm/db/database.mjs +885 -0
- package/dist/esm/db/decorators.mjs +148 -0
- package/dist/esm/db/index.mjs +42 -0
- package/dist/esm/db/insert.mjs +32 -0
- package/dist/esm/db/orm.mjs +225 -0
- package/dist/esm/db/ormstatements.mjs +223 -0
- package/dist/esm/db/procedure.mjs +93 -0
- package/dist/esm/db/query.mjs +38 -0
- package/dist/esm/db/repository.mjs +129 -0
- package/dist/esm/db/sequence.mjs +40 -0
- package/dist/esm/db/sql.mjs +497 -0
- package/dist/esm/db/store.mjs +153 -0
- package/dist/esm/db/translator.mjs +81 -0
- package/dist/esm/db/update.mjs +24 -0
- package/dist/esm/etcd/client.mjs +155 -0
- package/dist/esm/etcd/index.mjs +6 -0
- package/dist/esm/extensions/decorators.mjs +21 -0
- package/dist/esm/extensions/extensions.mjs +89 -0
- package/dist/esm/extensions/index.mjs +9 -0
- package/dist/esm/git/client.mjs +258 -0
- package/dist/esm/git/index.mjs +6 -0
- package/dist/esm/http/client-async.mjs +205 -0
- package/dist/esm/http/client.mjs +126 -0
- package/dist/esm/http/decorators.mjs +47 -0
- package/dist/esm/http/errors/ForbiddenError.mjs +22 -0
- package/dist/esm/http/errors/ValidationError.mjs +22 -0
- package/dist/esm/http/errors.mjs +7 -0
- package/dist/esm/http/index.mjs +29 -0
- package/dist/esm/http/request.mjs +262 -0
- package/dist/esm/http/response.mjs +433 -0
- package/dist/esm/http/rs/resource-common.mjs +13 -0
- package/dist/esm/http/rs/resource-http-controller.mjs +287 -0
- package/dist/esm/http/rs/resource-mappings.mjs +111 -0
- package/dist/esm/http/rs/resource-method.mjs +199 -0
- package/dist/esm/http/rs/resource.mjs +213 -0
- package/dist/esm/http/rs.mjs +12 -0
- package/dist/esm/http/session.mjs +105 -0
- package/dist/esm/http/upload.mjs +125 -0
- package/dist/esm/http/utils.mjs +87 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/indexing/index.mjs +9 -0
- package/dist/esm/indexing/searcher.mjs +51 -0
- package/dist/esm/indexing/writer.mjs +26 -0
- package/dist/esm/integrations/index.mjs +6 -0
- package/dist/esm/integrations/integrations.mjs +36 -0
- package/dist/esm/io/bytes.mjs +82 -0
- package/dist/esm/io/files.mjs +325 -0
- package/dist/esm/io/image.mjs +24 -0
- package/dist/esm/io/index.mjs +18 -0
- package/dist/esm/io/streams.mjs +224 -0
- package/dist/esm/io/zip.mjs +232 -0
- package/dist/esm/job/decorators.mjs +21 -0
- package/dist/esm/job/index.mjs +9 -0
- package/dist/esm/job/scheduler.mjs +328 -0
- package/dist/esm/junit/index.mjs +2 -0
- package/dist/esm/junit/junit.mjs +48 -0
- package/dist/esm/kafka/consumer.mjs +51 -0
- package/dist/esm/kafka/index.mjs +9 -0
- package/dist/esm/kafka/producer.mjs +51 -0
- package/dist/esm/log/index.mjs +6 -0
- package/dist/esm/log/logging.mjs +155 -0
- package/dist/esm/mail/client.mjs +134 -0
- package/dist/esm/mail/index.mjs +6 -0
- package/dist/esm/messaging/consumer.mjs +64 -0
- package/dist/esm/messaging/decorators.mjs +21 -0
- package/dist/esm/messaging/index.mjs +12 -0
- package/dist/esm/messaging/producer.mjs +62 -0
- package/dist/esm/mongodb/client.mjs +608 -0
- package/dist/esm/mongodb/dao.mjs +360 -0
- package/dist/esm/mongodb/index.mjs +7 -0
- package/dist/esm/net/decorators.mjs +21 -0
- package/dist/esm/net/index.mjs +12 -0
- package/dist/esm/net/soap.mjs +209 -0
- package/dist/esm/net/websockets.mjs +132 -0
- package/dist/esm/net/wrappers/onClose.mjs +2 -0
- package/dist/esm/net/wrappers/onError.mjs +2 -0
- package/dist/esm/net/wrappers/onMessage.mjs +2 -0
- package/dist/esm/net/wrappers/onOpen.mjs +2 -0
- package/dist/esm/pdf/index.mjs +6 -0
- package/dist/esm/pdf/pdf.mjs +141 -0
- package/dist/esm/platform/command.mjs +28 -0
- package/dist/esm/platform/engines.mjs +51 -0
- package/dist/esm/platform/index.mjs +27 -0
- package/dist/esm/platform/lifecycle.mjs +30 -0
- package/dist/esm/platform/os.mjs +32 -0
- package/dist/esm/platform/problems.mjs +108 -0
- package/dist/esm/platform/registry.mjs +300 -0
- package/dist/esm/platform/repository.mjs +479 -0
- package/dist/esm/platform/workspace.mjs +555 -0
- package/dist/esm/qldb/index.mjs +6 -0
- package/dist/esm/qldb/qldb.mjs +5 -0
- package/dist/esm/rabbitmq/consumer.mjs +31 -0
- package/dist/esm/rabbitmq/index.mjs +9 -0
- package/dist/esm/rabbitmq/producer.mjs +19 -0
- package/dist/esm/redis/client.mjs +171 -0
- package/dist/esm/redis/index.mjs +6 -0
- package/dist/esm/security/decorators.mjs +29 -0
- package/dist/esm/security/index.mjs +10 -0
- package/dist/esm/security/oauth.mjs +56 -0
- package/dist/esm/security/user.mjs +69 -0
- package/dist/esm/template/engines.mjs +120 -0
- package/dist/esm/template/index.mjs +6 -0
- package/dist/esm/utils/alphanumeric.mjs +88 -0
- package/dist/esm/utils/base64.mjs +85 -0
- package/dist/esm/utils/converter.mjs +59 -0
- package/dist/esm/utils/digest.mjs +148 -0
- package/dist/esm/utils/escape.mjs +141 -0
- package/dist/esm/utils/hex.mjs +85 -0
- package/dist/esm/utils/index.mjs +38 -0
- package/dist/esm/utils/jsonpath.mjs +470 -0
- package/dist/esm/utils/qrcode.mjs +22 -0
- package/dist/esm/utils/url.mjs +63 -0
- package/dist/esm/utils/utf8.mjs +42 -0
- package/dist/esm/utils/uuid.mjs +29 -0
- package/dist/esm/utils/xml.mjs +38 -0
- package/package.json +58 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a comprehensive static façade for file and directory operations,
|
|
3
|
+
* abstracting the underlying Java file system implementation.
|
|
4
|
+
*/
|
|
5
|
+
import { InputStream, OutputStream } from "@aerokit/sdk/io/streams";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a generic file system object (file or directory).
|
|
8
|
+
*/
|
|
9
|
+
export interface FileObject {
|
|
10
|
+
/** The simple name of the file or folder. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** The absolute path of the file or folder. */
|
|
13
|
+
path: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Represents a folder object, extending the basic file object with lists of its contents.
|
|
17
|
+
*/
|
|
18
|
+
export interface FolderObject extends FileObject {
|
|
19
|
+
/** A list of file objects contained within this folder. */
|
|
20
|
+
files: FileObject[];
|
|
21
|
+
/** A list of sub-folder objects contained within this folder. */
|
|
22
|
+
folders: FolderObject[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Files class provides static methods for high-level file system manipulation,
|
|
26
|
+
* including checking properties, reading/writing content, and navigating the structure.
|
|
27
|
+
*/
|
|
28
|
+
export declare class Files {
|
|
29
|
+
/**
|
|
30
|
+
* The file system-dependent name separator character (e.g., "/" on Unix, "\" on Windows).
|
|
31
|
+
*/
|
|
32
|
+
static readonly separator: string;
|
|
33
|
+
/**
|
|
34
|
+
* Checks if a file or directory exists at the given path.
|
|
35
|
+
* @param path The path to check.
|
|
36
|
+
* @returns True if the path exists, false otherwise.
|
|
37
|
+
*/
|
|
38
|
+
static exists(path: string): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Checks if the file or directory at the given path is executable.
|
|
41
|
+
* @param path The path to check.
|
|
42
|
+
* @returns True if executable, false otherwise.
|
|
43
|
+
*/
|
|
44
|
+
static isExecutable(path: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Checks if the file or directory at the given path is readable.
|
|
47
|
+
* @param path The path to check.
|
|
48
|
+
* @returns True if readable, false otherwise.
|
|
49
|
+
*/
|
|
50
|
+
static isReadable(path: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if the file or directory at the given path is writable.
|
|
53
|
+
* @param path The path to check.
|
|
54
|
+
* @returns True if writable, false otherwise.
|
|
55
|
+
*/
|
|
56
|
+
static isWritable(path: string): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if the file or directory at the given path is hidden.
|
|
59
|
+
* @param path The path to check.
|
|
60
|
+
* @returns True if hidden, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
static isHidden(path: string): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Checks if the path refers to a directory.
|
|
65
|
+
* @param path The path to check.
|
|
66
|
+
* @returns True if it's a directory, false otherwise.
|
|
67
|
+
*/
|
|
68
|
+
static isDirectory(path: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Checks if the path refers to a regular file.
|
|
71
|
+
* @param path The path to check.
|
|
72
|
+
* @returns True if it's a file, false otherwise.
|
|
73
|
+
*/
|
|
74
|
+
static isFile(path: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Checks if two paths refer to the same underlying file system object.
|
|
77
|
+
* @param path1 The first path.
|
|
78
|
+
* @param path2 The second path.
|
|
79
|
+
* @returns True if they reference the same file/directory, false otherwise.
|
|
80
|
+
*/
|
|
81
|
+
static isSameFile(path1: string, path2: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Returns the canonical (absolute and normalized) path for the given path.
|
|
84
|
+
* @param path The path to normalize.
|
|
85
|
+
* @returns The canonical path string.
|
|
86
|
+
*/
|
|
87
|
+
static getCanonicalPath(path: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the simple name of the file or directory at the given path (the last element).
|
|
90
|
+
* @param path The path.
|
|
91
|
+
* @returns The name.
|
|
92
|
+
*/
|
|
93
|
+
static getName(path: string): string;
|
|
94
|
+
/**
|
|
95
|
+
* Gets the path of the parent directory.
|
|
96
|
+
* @param path The path.
|
|
97
|
+
* @returns The parent path string, or null/empty if none exists.
|
|
98
|
+
*/
|
|
99
|
+
static getParentPath(path: string): string;
|
|
100
|
+
/**
|
|
101
|
+
* Reads all bytes from a file into a JavaScript byte array (an array of numbers).
|
|
102
|
+
*
|
|
103
|
+
* Note: This method automatically converts the native Java byte array to a
|
|
104
|
+
* JavaScript array using `Bytes.toJavaScriptBytes()`.
|
|
105
|
+
* @param path The path to the file.
|
|
106
|
+
* @returns A JavaScript array of byte values.
|
|
107
|
+
*/
|
|
108
|
+
static readBytes(path: string): any[];
|
|
109
|
+
/**
|
|
110
|
+
* Reads all bytes from a file and returns the native Java byte array object.
|
|
111
|
+
* @param path The path to the file.
|
|
112
|
+
* @returns The native Java byte array.
|
|
113
|
+
*/
|
|
114
|
+
static readBytesNative(path: string): any[];
|
|
115
|
+
/**
|
|
116
|
+
* Reads all text content from a file using the platform's default character encoding.
|
|
117
|
+
* @param path The path to the file.
|
|
118
|
+
* @returns The content of the file as a string.
|
|
119
|
+
*/
|
|
120
|
+
static readText(path: string): string;
|
|
121
|
+
/**
|
|
122
|
+
* Writes the content of a JavaScript byte array to a file. Overwrites existing content.
|
|
123
|
+
*
|
|
124
|
+
* Note: This method automatically converts the JavaScript array to a native
|
|
125
|
+
* Java byte array using `Bytes.toJavaBytes()` before writing.
|
|
126
|
+
* @param path The path to the file.
|
|
127
|
+
* @param data The JavaScript array of byte values to write.
|
|
128
|
+
*/
|
|
129
|
+
static writeBytes(path: string, data: any[]): void;
|
|
130
|
+
/**
|
|
131
|
+
* Writes the content of a native Java byte array to a file. Overwrites existing content.
|
|
132
|
+
* @param path The path to the file.
|
|
133
|
+
* @param data The native Java byte array to write.
|
|
134
|
+
*/
|
|
135
|
+
static writeBytesNative(path: string, data: any[]): void;
|
|
136
|
+
/**
|
|
137
|
+
* Writes a string of text to a file using the platform's default character encoding. Overwrites existing content.
|
|
138
|
+
* @param path The path to the file.
|
|
139
|
+
* @param text The string content to write.
|
|
140
|
+
*/
|
|
141
|
+
static writeText(path: string, text: string): void;
|
|
142
|
+
/**
|
|
143
|
+
* Gets the last modified time of the file or directory.
|
|
144
|
+
* @param path The path to the file or directory.
|
|
145
|
+
* @returns A JavaScript Date object representing the last modified time.
|
|
146
|
+
*/
|
|
147
|
+
static getLastModified(path: string): Date;
|
|
148
|
+
/**
|
|
149
|
+
* Sets the last modified time of the file or directory.
|
|
150
|
+
* @param path The path to the file or directory.
|
|
151
|
+
* @param time The new Date object to set as the last modified time.
|
|
152
|
+
*/
|
|
153
|
+
static setLastModified(path: string, time: Date): void;
|
|
154
|
+
/**
|
|
155
|
+
* Gets the owner of the file or directory.
|
|
156
|
+
* @param path The path to the file or directory.
|
|
157
|
+
* @returns The owner name as a string.
|
|
158
|
+
*/
|
|
159
|
+
static getOwner(path: string): string;
|
|
160
|
+
/**
|
|
161
|
+
* Sets the owner of the file or directory.
|
|
162
|
+
* @param path The path to the file or directory.
|
|
163
|
+
* @param owner The new owner name.
|
|
164
|
+
*/
|
|
165
|
+
static setOwner(path: string, owner: string): void;
|
|
166
|
+
/**
|
|
167
|
+
* Gets the permissions string for the file or directory (implementation dependent).
|
|
168
|
+
* @param path The path to the file or directory.
|
|
169
|
+
* @returns The permissions string.
|
|
170
|
+
*/
|
|
171
|
+
static getPermissions(path: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* Sets the permissions for the file or directory (implementation dependent).
|
|
174
|
+
* @param path The path to the file or directory.
|
|
175
|
+
* @param permissions The permissions string.
|
|
176
|
+
*/
|
|
177
|
+
static setPermissions(path: string, permissions: string): void;
|
|
178
|
+
/**
|
|
179
|
+
* Gets the size of the file in bytes.
|
|
180
|
+
* @param path The path to the file.
|
|
181
|
+
* @returns The size in bytes.
|
|
182
|
+
*/
|
|
183
|
+
static size(path: string): number;
|
|
184
|
+
/**
|
|
185
|
+
* Creates a new, empty file at the specified path.
|
|
186
|
+
* @param path The path where the file should be created.
|
|
187
|
+
*/
|
|
188
|
+
static createFile(path: string): void;
|
|
189
|
+
/**
|
|
190
|
+
* Creates a new directory at the specified path.
|
|
191
|
+
* @param path The path where the directory should be created.
|
|
192
|
+
*/
|
|
193
|
+
static createDirectory(path: string): void;
|
|
194
|
+
/**
|
|
195
|
+
* Copies a file or directory from a source path to a target path.
|
|
196
|
+
* @param source The source path.
|
|
197
|
+
* @param target The target path.
|
|
198
|
+
*/
|
|
199
|
+
static copy(source: string, target: string): void;
|
|
200
|
+
/**
|
|
201
|
+
* Moves or renames a file or directory.
|
|
202
|
+
* @param source The source path.
|
|
203
|
+
* @param target The target path.
|
|
204
|
+
*/
|
|
205
|
+
static move(source: string, target: string): void;
|
|
206
|
+
/**
|
|
207
|
+
* Deletes the file at the specified path.
|
|
208
|
+
* @param path The path to the file to delete.
|
|
209
|
+
*/
|
|
210
|
+
static deleteFile(path: string): void;
|
|
211
|
+
/**
|
|
212
|
+
* Deletes the directory at the specified path.
|
|
213
|
+
* @param path The path to the directory to delete.
|
|
214
|
+
* @param forced If true, recursively deletes the directory and its contents.
|
|
215
|
+
*/
|
|
216
|
+
static deleteDirectory(path: string, forced?: boolean): void;
|
|
217
|
+
/**
|
|
218
|
+
* Creates a new temporary file with the given prefix and suffix.
|
|
219
|
+
* @param prefix The prefix string to be used in generating the file's name.
|
|
220
|
+
* @param suffix The suffix string to be used in generating the file's name.
|
|
221
|
+
* @returns The path of the created temporary file.
|
|
222
|
+
*/
|
|
223
|
+
static createTempFile(prefix: string, suffix: string): string;
|
|
224
|
+
/**
|
|
225
|
+
* Creates a new temporary directory with the given prefix.
|
|
226
|
+
* @param prefix The prefix string to be used in generating the directory's name.
|
|
227
|
+
* @returns The path of the created temporary directory.
|
|
228
|
+
*/
|
|
229
|
+
static createTempDirectory(prefix: string): string;
|
|
230
|
+
/**
|
|
231
|
+
* Creates and returns a new {@link InputStream} for reading data from the file.
|
|
232
|
+
* @param path The path to the file.
|
|
233
|
+
* @returns A new InputStream instance.
|
|
234
|
+
*/
|
|
235
|
+
static createInputStream(path: string): InputStream;
|
|
236
|
+
/**
|
|
237
|
+
* Creates and returns a new {@link OutputStream} for writing data to the file.
|
|
238
|
+
* @param path The path to the file.
|
|
239
|
+
* @returns A new OutputStream instance.
|
|
240
|
+
*/
|
|
241
|
+
static createOutputStream(path: string): OutputStream;
|
|
242
|
+
/**
|
|
243
|
+
* Traverses a directory and returns a structured {@link FolderObject} hierarchy.
|
|
244
|
+
* @param path The path to the folder to traverse.
|
|
245
|
+
* @returns The root FolderObject containing the file system tree structure.
|
|
246
|
+
*/
|
|
247
|
+
static traverse(path: string): FolderObject[];
|
|
248
|
+
/**
|
|
249
|
+
* Lists the direct children (files and folders) of a directory, returning only their paths.
|
|
250
|
+
* @param path The path to the directory.
|
|
251
|
+
* @returns An array of string paths for the contents of the directory.
|
|
252
|
+
*/
|
|
253
|
+
static list(path: string): string[];
|
|
254
|
+
/**
|
|
255
|
+
* Finds files and directories matching a specified glob pattern within a directory tree.
|
|
256
|
+
* @param path The starting path for the search.
|
|
257
|
+
* @param pattern The glob pattern to match (e.g., "*.js", "**.txt").
|
|
258
|
+
* @returns An array of string paths that match the pattern.
|
|
259
|
+
*/
|
|
260
|
+
static find(path: string, pattern: string): string[];
|
|
261
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides a static façade for image manipulation operations,
|
|
3
|
+
* primarily focusing on resizing image streams.
|
|
4
|
+
*/
|
|
5
|
+
import { InputStream } from "@aerokit/sdk/io/streams";
|
|
6
|
+
/**
|
|
7
|
+
* The Image class provides static methods for common image processing tasks.
|
|
8
|
+
* All methods operate on and return {@link InputStream} objects, making them
|
|
9
|
+
* suitable for piping image data through the file system or network.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Image {
|
|
12
|
+
/**
|
|
13
|
+
* Resizes an image contained within an InputStream to the specified dimensions.
|
|
14
|
+
*
|
|
15
|
+
* @param original The InputStream containing the original image data.
|
|
16
|
+
* @param type The target format of the resized image (e.g., "png", "jpeg", "gif").
|
|
17
|
+
* @param width The target width in pixels.
|
|
18
|
+
* @param height The target height in pixels.
|
|
19
|
+
* @returns A new InputStream containing the resized image data in the specified format.
|
|
20
|
+
*/
|
|
21
|
+
static resize(original: InputStream, type: string, width: number, height: number): InputStream;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./bytes";
|
|
2
|
+
export { Bytes as bytes } from "./bytes";
|
|
3
|
+
export * from "./files";
|
|
4
|
+
export { Files as files } from "./files";
|
|
5
|
+
export * from "./image";
|
|
6
|
+
export { Image as image } from "./image";
|
|
7
|
+
export * from "./streams";
|
|
8
|
+
export { Streams as streams } from "./streams";
|
|
9
|
+
export * from "./zip";
|
|
10
|
+
export { Zip as zip } from "./zip";
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Streams class provides static utility methods for stream creation,
|
|
3
|
+
* manipulation, and data copying.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Streams {
|
|
6
|
+
/**
|
|
7
|
+
* Copies all bytes from the input stream to the output stream.
|
|
8
|
+
* This method is generally used for smaller streams.
|
|
9
|
+
*
|
|
10
|
+
* @param input The source {@link InputStream}.
|
|
11
|
+
* @param output The destination {@link OutputStream}.
|
|
12
|
+
*/
|
|
13
|
+
static copy(input: InputStream, output: OutputStream): void;
|
|
14
|
+
/**
|
|
15
|
+
* Copies all bytes from the input stream to the output stream using a large buffer,
|
|
16
|
+
* suitable for large file transfers.
|
|
17
|
+
*
|
|
18
|
+
* @param input The source {@link InputStream}.
|
|
19
|
+
* @param output The destination {@link OutputStream}.
|
|
20
|
+
*/
|
|
21
|
+
static copyLarge(input: InputStream, output: OutputStream): void;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new {@link InputStream} from a resource accessible via the class loader.
|
|
24
|
+
* This is typically used to read bundled resources within the application runtime.
|
|
25
|
+
*
|
|
26
|
+
* @param path The path to the resource.
|
|
27
|
+
* @returns A new {@link InputStream} instance for the resource.
|
|
28
|
+
*/
|
|
29
|
+
static getResourceAsByteArrayInputStream(path: string): InputStream;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new {@link InputStream} from a JavaScript byte array (`any[]`).
|
|
32
|
+
*
|
|
33
|
+
* @param data The JavaScript array of byte values (`number[]`).
|
|
34
|
+
* @returns A new {@link InputStream} instance initialized with the byte data.
|
|
35
|
+
*/
|
|
36
|
+
static createByteArrayInputStream(data: any[]): InputStream;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new {@link OutputStream} that writes data into an in-memory byte array.
|
|
39
|
+
* This is typically used as a buffer to capture output before processing it.
|
|
40
|
+
*
|
|
41
|
+
* @returns A new {@link OutputStream} instance backed by a byte array.
|
|
42
|
+
*/
|
|
43
|
+
static createByteArrayOutputStream(): OutputStream;
|
|
44
|
+
/**
|
|
45
|
+
* Wraps a native (Java) InputStream object into a new JavaScript {@link InputStream} instance.
|
|
46
|
+
*
|
|
47
|
+
* @param native The underlying native InputStream object.
|
|
48
|
+
* @returns A new {@link InputStream} wrapper.
|
|
49
|
+
*/
|
|
50
|
+
static createInputStream(native: any): InputStream;
|
|
51
|
+
/**
|
|
52
|
+
* Wraps a native (Java) OutputStream object into a new JavaScript {@link OutputStream} instance.
|
|
53
|
+
*
|
|
54
|
+
* Note: This method is not static in the original definition, but is placed here for completeness
|
|
55
|
+
* and consistency with other factory methods.
|
|
56
|
+
*
|
|
57
|
+
* @param native The underlying native OutputStream object.
|
|
58
|
+
* @returns A new {@link OutputStream} wrapper.
|
|
59
|
+
*/
|
|
60
|
+
createOutputStream(native: any): OutputStream;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Represents an input stream for reading bytes.
|
|
64
|
+
* This class wraps a native stream object and provides methods for reading data.
|
|
65
|
+
*/
|
|
66
|
+
export declare class InputStream {
|
|
67
|
+
/** The underlying native Java stream object. */
|
|
68
|
+
readonly native: any;
|
|
69
|
+
/**
|
|
70
|
+
* @param native The native Java InputStream object.
|
|
71
|
+
*/
|
|
72
|
+
constructor(native: any);
|
|
73
|
+
/**
|
|
74
|
+
* Reads the next byte of data from this input stream.
|
|
75
|
+
* @returns The next byte of data, or -1 if the end of the stream is reached.
|
|
76
|
+
*/
|
|
77
|
+
read(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Reads all remaining bytes from the stream and returns them as a JavaScript array.
|
|
80
|
+
*
|
|
81
|
+
* @returns A JavaScript array (`number[]`) of the byte values.
|
|
82
|
+
*/
|
|
83
|
+
readBytes(): any[];
|
|
84
|
+
/**
|
|
85
|
+
* Reads all remaining bytes from the stream and returns the native Java byte array.
|
|
86
|
+
*
|
|
87
|
+
* @returns The native Java byte array object.
|
|
88
|
+
*/
|
|
89
|
+
readBytesNative(): any[];
|
|
90
|
+
/**
|
|
91
|
+
* Reads all remaining bytes from the stream and converts them to a string
|
|
92
|
+
* using the platform's default character encoding.
|
|
93
|
+
*
|
|
94
|
+
* @returns The content of the stream as a string.
|
|
95
|
+
*/
|
|
96
|
+
readText(): string;
|
|
97
|
+
/**
|
|
98
|
+
* Closes this input stream and releases any system resources associated with it.
|
|
99
|
+
*/
|
|
100
|
+
close(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Checks if the underlying native stream object is defined and non-null.
|
|
103
|
+
* @returns True if the stream is valid, false otherwise.
|
|
104
|
+
*/
|
|
105
|
+
isValid(): boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Represents an output stream for writing bytes.
|
|
109
|
+
* This class wraps a native stream object and provides methods for writing data.
|
|
110
|
+
*/
|
|
111
|
+
export declare class OutputStream {
|
|
112
|
+
/** The underlying native Java stream object. */
|
|
113
|
+
readonly native: any;
|
|
114
|
+
/**
|
|
115
|
+
* @param native The native Java OutputStream object.
|
|
116
|
+
*/
|
|
117
|
+
constructor(native: any);
|
|
118
|
+
/**
|
|
119
|
+
* Writes the specified byte to this output stream.
|
|
120
|
+
* @param byte The byte (as a number 0-255) to write.
|
|
121
|
+
*/
|
|
122
|
+
write(byte: number): void;
|
|
123
|
+
/**
|
|
124
|
+
* Writes the entire content of a JavaScript byte array to this output stream.
|
|
125
|
+
*
|
|
126
|
+
* @param data The JavaScript array (`number[]`) of byte values to write.
|
|
127
|
+
*/
|
|
128
|
+
writeBytes(data: any[]): void;
|
|
129
|
+
/**
|
|
130
|
+
* Writes the entire content of a native Java byte array to this output stream.
|
|
131
|
+
*
|
|
132
|
+
* @param data The native Java byte array object to write.
|
|
133
|
+
*/
|
|
134
|
+
writeBytesNative(data: any[]): void;
|
|
135
|
+
/**
|
|
136
|
+
* Converts the string to bytes using the platform's default character encoding
|
|
137
|
+
* and writes them to this output stream.
|
|
138
|
+
*
|
|
139
|
+
* @param text The string content to write.
|
|
140
|
+
*/
|
|
141
|
+
writeText(text: string): void;
|
|
142
|
+
/**
|
|
143
|
+
* Closes this output stream and releases any system resources associated with it.
|
|
144
|
+
*/
|
|
145
|
+
close(): void;
|
|
146
|
+
/**
|
|
147
|
+
* Retrieves the content written to this stream as a JavaScript byte array.
|
|
148
|
+
* This is typically used with a ByteArrayOutputStream.
|
|
149
|
+
*
|
|
150
|
+
* @returns A JavaScript array (`number[]`) of the byte values written to the stream.
|
|
151
|
+
*/
|
|
152
|
+
getBytes(): any[];
|
|
153
|
+
/**
|
|
154
|
+
* Retrieves the content written to this stream as the native Java byte array.
|
|
155
|
+
* This is typically used with a ByteArrayOutputStream.
|
|
156
|
+
*
|
|
157
|
+
* @returns The native Java byte array object.
|
|
158
|
+
*/
|
|
159
|
+
getBytesNative(): any[];
|
|
160
|
+
/**
|
|
161
|
+
* Retrieves the content written to this stream as a string using the platform's
|
|
162
|
+
* default character encoding. This is typically used with a ByteArrayOutputStream.
|
|
163
|
+
*
|
|
164
|
+
* @returns The content of the stream as a string.
|
|
165
|
+
*/
|
|
166
|
+
getText(): string;
|
|
167
|
+
/**
|
|
168
|
+
* Checks if the underlying native stream object is defined and non-null.
|
|
169
|
+
* @returns True if the stream is valid, false otherwise.
|
|
170
|
+
*/
|
|
171
|
+
isValid(): boolean;
|
|
172
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { InputStream, OutputStream } from "@aerokit/sdk/io/streams";
|
|
2
|
+
/**
|
|
3
|
+
* The Zip class provides static utility methods for managing ZIP archives
|
|
4
|
+
* at both file path level and stream level.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Zip {
|
|
7
|
+
/**
|
|
8
|
+
* Zips the content of a source directory or file into a target ZIP file.
|
|
9
|
+
*
|
|
10
|
+
* @param sourcePath The file system path to the content to be compressed.
|
|
11
|
+
* @param zipTargetPath The file system path where the resulting ZIP file should be saved.
|
|
12
|
+
*/
|
|
13
|
+
static zip(sourcePath: string, zipTargetPath: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Unzips an existing ZIP file into a target directory.
|
|
16
|
+
*
|
|
17
|
+
* @param zipPath The file system path to the ZIP file to be extracted.
|
|
18
|
+
* @param targetPath The file system path to the directory where content should be extracted.
|
|
19
|
+
*/
|
|
20
|
+
static unzip(zipPath: string, targetPath: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Creates a {@link ZipInputStream} that reads ZIP archive data from a provided
|
|
23
|
+
* generic {@link InputStream}. This allows for reading ZIP entries without
|
|
24
|
+
* writing the archive to disk first.
|
|
25
|
+
*
|
|
26
|
+
* @param inputStream The source stream containing the raw ZIP data.
|
|
27
|
+
* @returns A new {@link ZipInputStream} instance.
|
|
28
|
+
*/
|
|
29
|
+
static createZipInputStream(inputStream: InputStream): ZipInputStream;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a {@link ZipOutputStream} that writes compressed ZIP archive data
|
|
32
|
+
* to a provided generic {@link OutputStream}. This allows for creating ZIP archives
|
|
33
|
+
* in memory or streaming them directly.
|
|
34
|
+
*
|
|
35
|
+
* @param outputStream The destination stream where the raw ZIP data will be written.
|
|
36
|
+
* @returns A new {@link ZipOutputStream} instance.
|
|
37
|
+
*/
|
|
38
|
+
static createZipOutputStream(outputStream: OutputStream): ZipOutputStream;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents an input stream for reading data from a ZIP archive.
|
|
42
|
+
* Data is accessed sequentially by iterating through {@link ZipEntry} objects.
|
|
43
|
+
*/
|
|
44
|
+
export declare class ZipInputStream {
|
|
45
|
+
private readonly native;
|
|
46
|
+
/**
|
|
47
|
+
* @param native The underlying native ZipInputStream object.
|
|
48
|
+
*/
|
|
49
|
+
constructor(native: any);
|
|
50
|
+
/**
|
|
51
|
+
* Reads the next ZIP file entry and positions the stream at the beginning of the entry data.
|
|
52
|
+
* Must be called before reading data for an entry.
|
|
53
|
+
*
|
|
54
|
+
* @returns The next {@link ZipEntry} object, or null if there are no more entries.
|
|
55
|
+
*/
|
|
56
|
+
getNextEntry(): ZipEntry;
|
|
57
|
+
/**
|
|
58
|
+
* Reads the data for the current entry and returns it as a JavaScript byte array.
|
|
59
|
+
*
|
|
60
|
+
* @returns A JavaScript array (`number[]`) of the byte values for the current entry.
|
|
61
|
+
*/
|
|
62
|
+
read(): any[];
|
|
63
|
+
/**
|
|
64
|
+
* Reads the data for the current entry and returns the native Java byte array.
|
|
65
|
+
*
|
|
66
|
+
* @returns The native Java byte array object.
|
|
67
|
+
*/
|
|
68
|
+
readNative(): any[];
|
|
69
|
+
/**
|
|
70
|
+
* Reads the data for the current entry and converts it to a string
|
|
71
|
+
* using the platform's default character encoding.
|
|
72
|
+
*
|
|
73
|
+
* @returns The content of the current entry as a string.
|
|
74
|
+
*/
|
|
75
|
+
readText(): string;
|
|
76
|
+
/**
|
|
77
|
+
* Closes the underlying native ZipInputStream.
|
|
78
|
+
*/
|
|
79
|
+
close(): void;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Represents an output stream for writing data to a ZIP archive.
|
|
83
|
+
* Entries must be explicitly created and closed.
|
|
84
|
+
*/
|
|
85
|
+
export declare class ZipOutputStream {
|
|
86
|
+
private readonly native;
|
|
87
|
+
/**
|
|
88
|
+
* @param native The underlying native ZipOutputStream object.
|
|
89
|
+
*/
|
|
90
|
+
constructor(native: any);
|
|
91
|
+
/**
|
|
92
|
+
* Creates a new {@link ZipEntry} with the given name, and begins writing the
|
|
93
|
+
* entry's header to the archive stream. All subsequent write operations
|
|
94
|
+
* will apply to this entry until {@link closeEntry} is called.
|
|
95
|
+
*
|
|
96
|
+
* @param name The file or directory name to use inside the ZIP archive.
|
|
97
|
+
* @returns The newly created {@link ZipEntry} object.
|
|
98
|
+
*/
|
|
99
|
+
createZipEntry(name: string): ZipEntry;
|
|
100
|
+
/**
|
|
101
|
+
* Writes the data from a JavaScript byte array to the current active entry in the stream.
|
|
102
|
+
*
|
|
103
|
+
* @param data The JavaScript array (`number[]`) of byte values to write.
|
|
104
|
+
*/
|
|
105
|
+
write(data: any[]): void;
|
|
106
|
+
/**
|
|
107
|
+
* Writes the data from a native Java byte array to the current active entry in the stream.
|
|
108
|
+
*
|
|
109
|
+
* @param data The native Java byte array object to write.
|
|
110
|
+
*/
|
|
111
|
+
writeNative(data: any[]): void;
|
|
112
|
+
/**
|
|
113
|
+
* Converts the string to bytes and writes it to the current active entry in the stream.
|
|
114
|
+
*
|
|
115
|
+
* @param text The string content to write.
|
|
116
|
+
*/
|
|
117
|
+
writeText(text: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* Closes the current active ZIP entry and positions the stream for the next entry.
|
|
120
|
+
*/
|
|
121
|
+
closeEntry(): void;
|
|
122
|
+
/**
|
|
123
|
+
* Finalizes the writing of the ZIP file, flushes the stream, and closes the native object.
|
|
124
|
+
* This must be called after all entries have been written.
|
|
125
|
+
*/
|
|
126
|
+
close(): void;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Represents an entry (file or directory) within a ZIP archive.
|
|
130
|
+
* It holds metadata about the archived item.
|
|
131
|
+
*/
|
|
132
|
+
export declare class ZipEntry {
|
|
133
|
+
private readonly native;
|
|
134
|
+
/**
|
|
135
|
+
* @param native The underlying native ZipEntry object.
|
|
136
|
+
*/
|
|
137
|
+
constructor(native: any);
|
|
138
|
+
/**
|
|
139
|
+
* Gets the name of the entry (path relative to the ZIP root).
|
|
140
|
+
* @returns The name of the entry.
|
|
141
|
+
*/
|
|
142
|
+
getName(): string;
|
|
143
|
+
/**
|
|
144
|
+
* Gets the uncompressed size of the entry data.
|
|
145
|
+
* @returns The size in bytes.
|
|
146
|
+
*/
|
|
147
|
+
getSize(): number;
|
|
148
|
+
/**
|
|
149
|
+
* Gets the compressed size of the entry data.
|
|
150
|
+
* @returns The compressed size in bytes.
|
|
151
|
+
*/
|
|
152
|
+
getCompressedSize(): number;
|
|
153
|
+
/**
|
|
154
|
+
* Gets the modification time of the entry.
|
|
155
|
+
* @returns The time as a numerical timestamp.
|
|
156
|
+
*/
|
|
157
|
+
getTime(): number;
|
|
158
|
+
/**
|
|
159
|
+
* Gets the CRC-32 checksum of the uncompressed entry data.
|
|
160
|
+
* @returns The CRC value.
|
|
161
|
+
*/
|
|
162
|
+
getCrc(): number;
|
|
163
|
+
/**
|
|
164
|
+
* Gets the optional comment for the entry.
|
|
165
|
+
* @returns The comment string.
|
|
166
|
+
*/
|
|
167
|
+
getComment(): string;
|
|
168
|
+
/**
|
|
169
|
+
* Checks if the entry represents a directory.
|
|
170
|
+
* @returns True if it is a directory, false otherwise.
|
|
171
|
+
*/
|
|
172
|
+
isDirectory(): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Checks if the underlying native ZipEntry object is defined and non-null.
|
|
175
|
+
* @returns True if the entry is valid, false otherwise.
|
|
176
|
+
*/
|
|
177
|
+
isValid(): boolean;
|
|
178
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ScheduledOptions {
|
|
2
|
+
expression: string;
|
|
3
|
+
group?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @Scheduled decorator
|
|
7
|
+
* Marks an entire class as a scheduled job with a cron expression.
|
|
8
|
+
*
|
|
9
|
+
* introduced in TypeScript 5.0, which expects a ClassDecoratorContext object.
|
|
10
|
+
*/
|
|
11
|
+
export declare function Scheduled(options: ScheduledOptions): <T extends abstract new (...args: any) => any>(target: T, context: ClassDecoratorContext<T>) => void;
|