IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

DirList Event

Fired when a directory entry is received.

Syntax

cloudstorage.on('DirList', [callback])

Callback

The 'callback' is called when the 'DirList' event is emited.

function(e){ }

The argument 'e' has the following properties:

e.fileName
e.isDir
e.fileSize
e.fileTime

Remarks

This event fires once for each entry returned when ListDirectory is called.

FileName holds the name of the file or folder.

IsDir is true for directories and false for files.

FileSize is the size of the file in bytes. For some providers this also applies directories and will return the size of all files and folders within the directory.

The table below summarizes the applicability of this value on a per-provider basis:

Service Provider FilesDirectories
spAmazonS3 (0) X
spBox (1) X X
spDropbox (2) X
spGoogleDrive (3) X
spOneDrive (4) X X
spAzureBlob (6) X
spWasabi (7) X
spDigitalOcean (8) X
spGoogleStorage (9) X
spHadoopDFS (10) X
spAzureFile (11) X
spBackblazeB2 (12) X
spIBMStorage (13) X
spLinode (14) X

FileTime is the modified date of the file. By default the datetime format used is "yyyy-MM-dd'T'HH:mm:ss". To modify this format set DateFormat.

Note: Modified times are not applicable to directories for the following providers:

  • spAmazonS3 (0)
  • spDropbox (2)
  • spWasabi (7)
  • spDigitalOcean (8)
  • spGoogleStorage (9)
  • spBackblazeB2 (12)
  • spIBMStorage (13)
  • spLinode (14)

Additionally, the following providers do not return modified times at all:

  • spAzureFile (11)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Node.js Edition - Version 20.0 [Build 8265]