Message Boards Message Boards

1
|
9585 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

How to obtain the properties of a CloudObject

Is there a documented way to obtain the properties of a CloudObject like name, path, type, extension without using CloudObjectInformation? E.g., the functions FileType and FileByteCount seem to work for CloudObjects, but other built-in functions like FileExtension or FileDate do not.

POSTED BY: Sascha Kratky
Posted 9 years ago

Two points:

  1. We are adding support for all the file property functions. In coming Mathematica versions and CloudObject paclet updates, FileDate and FileByteCount on a CloudObject should work as expected.

  2. CloudObjectInformation is being improved to be more performant. In particular, you can ask for a single property:

    CloudObjectInformation[obj, "Path"]

or a subset of properties:

CloudObjectInformation[obj, {"FileByteCount", "LastAccessed"}]

And only the information requested will be returned from the cloud, making it a faster call.

Further, CloudObjectInformation[obj, "UUID"] is optimized to return immediately with no network call if obj is a CloudObject expression with a URL in the canonical by-UUID format that CloudObject[] returns.

Also, you can query multiple objects at the same time, e.g.

CloudObjectInformation[CloudObjects["Type" -> Delayed], {"UUID", "Path"}]

and this returns its information in one efficient network call.

POSTED BY: Joel Klein
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract