@@ -534,17 +534,43 @@ Serialize and write data to `io::AzObject`. See serialize(conainer, blobname, d
534534Serialization. serialize (o:: AzObject , data) = serialize (o. container, o. name, data)
535535
536536"""
537- touch(container, "blobname" )
537+ touch(c, b )
538538
539- Create a zero-byte object with name `blobname` in `container::AzContainer`.
539+ Update the metadata of a blob `b::AbstractString` in container `c::AzContainer`, changing
540+ the datset's 'LAST MODIFIED' date. If the blob does not exist, then a zero-byte blob is
541+ created.
540542
541543# Example
542544```
543545container = AzContainer("mycontainer";storageaccount="mystorageaccount")
544546touch(container, "foo")
545547```
546548"""
547- Base. touch (c:: AzContainer , o:: AbstractString ) = write (c, o, " \0 " )
549+ function Base. touch (c:: AzContainer , o:: AbstractString )
550+ if ! isfile (c, o)
551+ write (c, o, " \0 " )
552+ else
553+ @retry c. nretry HTTP. request (
554+ " PUT" ,
555+ " https://$(c. storageaccount) .blob.core.windows.net/$(c. containername) /$(addprefix (c,o)) ?comp=metadata" ,
556+ [
557+ " Authorization" => " Bearer $(token (c. session)) " ,
558+ " x-ms-version" => API_VERSION,
559+ " x-ms-meta-touched" => string (Dates. now (UTC))
560+ ];
561+ retry = false ,
562+ verbose = c. verbose,
563+ connect_timeout = c. connect_timeout,
564+ readtimeout = c. read_timeout)
565+ end
566+ end
567+
568+ """
569+ touch(o)
570+
571+ Update the metadata of a blob `o::AzObject`, changing the dataset's 'LAST MODIFIED' date.
572+ """
573+ Base. touch (o:: AzObject ) = touch (o. container, o. name)
548574
549575"""
550576 touch(io::AzObject)
@@ -1416,34 +1442,6 @@ Note that the information stored is global, and not specfic to any one given IO
14161442"""
14171443getperf_counters () = @ccall libAzStorage. getperf_counters ():: PerfCounters
14181444
1419- """
1420- touch!(c, b)
1421-
1422- Update the metadata of a blob `b::AbstractString` in container `c::AzContainer`, changing
1423- the datset's 'LAST MODIFIED' date.
1424- """
1425- function Base. touch (c:: AzContainer , o:: AbstractString )
1426- @retry c. nretry HTTP. request (
1427- " PUT" ,
1428- " https://$(c. storageaccount) .blob.core.windows.net/$(c. containername) /$(addprefix (c,o)) ?comp=metadata" ,
1429- [
1430- " Authorization" => " Bearer $(token (c. session)) " ,
1431- " x-ms-version" => API_VERSION,
1432- " x-ms-meta-touched" => string (Dates. now (UTC))
1433- ];
1434- retry = false ,
1435- verbose = c. verbose,
1436- connect_timeout = c. connect_timeout,
1437- readtimeout = c. read_timeout)
1438- end
1439-
1440- """
1441- touch(o)
1442-
1443- Update the metadata of a blob `o::AzObject`, changing the dataset's 'LAST MODIFIED' date.
1444- """
1445- Base. touch (o:: AzObject ) = touch (o. container, o. name)
1446-
14471445"""
14481446 tier!(c, b[; tier="Hot"])
14491447
0 commit comments