-
Notifications
You must be signed in to change notification settings - Fork 224
/
com.azure.storage.file.share.ShareFileClient.yml
1427 lines (1427 loc) · 191 KB
/
com.azure.storage.file.share.ShareFileClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### YamlMime:JavaType
uid: "com.azure.storage.file.share.ShareFileClient"
fullName: "com.azure.storage.file.share.ShareFileClient"
name: "ShareFileClient"
nameWithType: "ShareFileClient"
summary: "This class provides a client that contains all the operations for interacting files under Azure Storage File Service."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ShareFileClient**"
methods:
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopy(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopy(String copyId)"
name: "abortCopy(String copyId)"
nameWithType: "ShareFileClient.abortCopy(String copyId)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public void abortCopy(String copyId)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nfileClient.abortCopy(\"someCopyId\");\n System.out.println(\"Abort copying the file completed.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> abortCopyWithResponse(String copyId, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.abortCopyWithResponse(\"someCopyId\", requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"Abort copying the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
returns:
description: "A response containing the status of aborting copy the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.abortCopyWithResponse(String copyId, Duration timeout, Context context)"
name: "abortCopyWithResponse(String copyId, Duration timeout, Context context)"
nameWithType: "ShareFileClient.abortCopyWithResponse(String copyId, Duration timeout, Context context)"
summary: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata."
parameters:
- description: "Specifies the copy id which has copying pending status associate with it."
name: "copyId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> abortCopyWithResponse(String copyId, Duration timeout, Context context)"
desc: "Aborts a pending Copy File operation, and leaves a destination file with zero length and full metadata.\n\n**Code Samples**\n\nAbort copy file from copy id(\"someCopyId\")\n\n```java\nResponse<Void> response = fileClient.abortCopyWithResponse(\"someCopyId\", Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Abort copying the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/abort-copy-file"
returns:
description: "A response containing the status of aborting copy the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,com.azure.storage.file.share.FileSmbProperties,java.lang.String,com.azure.storage.file.share.models.PermissionCopyModeType,java.lang.Boolean,java.lang.Boolean,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.storage.file.share.models.ShareRequestConditions)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
name: "beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Mode of file permission acquisition."
name: "filePermissionCopyMode"
type: "<xref href=\"com.azure.storage.file.share.models.PermissionCopyModeType?alt=com.azure.storage.file.share.models.PermissionCopyModeType&text=PermissionCopyModeType\" data-throw-if-not-resolved=\"False\" />"
- description: "Whether to copy despite target being read only. (default is false)"
name: "ignoreReadOnly"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "Whether the archive attribute is to be set on the target. (default is true)"
name: "setArchiveAttribute"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the\n naming rules."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "destinationRequestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, FileSmbProperties smbProperties, String filePermission, PermissionCopyModeType filePermissionCopyMode, Boolean ignoreReadOnly, Boolean setArchiveAttribute, Map<String,String> metadata, Duration pollInterval, ShareRequestConditions destinationRequestConditions)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n boolean ignoreReadOnly = false; // Default value\n boolean setArchiveAttribute = true; // Default value\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n SyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\", smbProperties, filePermission,\n PermissionCopyModeType.SOURCE, ignoreReadOnly, setArchiveAttribute,\n Collections.singletonMap(\"file\", \"metadata\"), Duration.ofSeconds(2), requestConditions);\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,com.azure.storage.file.share.options.ShareFileCopyOptions,java.time.Duration)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
name: "beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileCopyOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileCopyOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileCopyOptions?alt=com.azure.storage.file.share.options.ShareFileCopyOptions&text=ShareFileCopyOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, ShareFileCopyOptions options, Duration pollInterval)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n boolean ignoreReadOnly = false; // Default value\n boolean setArchiveAttribute = true; // Default value\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n CopyableFileSmbPropertiesList list = new CopyableFileSmbPropertiesList().setCreatedOn(true).setLastWrittenOn(true);\n // NOTE: FileSmbProperties and CopyableFileSmbPropertiesList should never be both set\n\n ShareFileCopyOptions options = new ShareFileCopyOptions()\n .setSmbProperties(smbProperties)\n .setFilePermission(filePermission)\n .setIgnoreReadOnly(ignoreReadOnly)\n .setArchiveAttribute(setArchiveAttribute)\n .setDestinationRequestConditions(requestConditions)\n .setSmbPropertiesToCopy(list)\n .setPermissionCopyModeType(PermissionCopyModeType.SOURCE)\n .setMetadata(Collections.singletonMap(\"file\", \"metadata\"));\n\n SyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\", options, Duration.ofSeconds(2));\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.beginCopy(java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration)"
fullName: "com.azure.storage.file.share.ShareFileClient.beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
name: "beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
nameWithType: "ShareFileClient.beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
summary: "Copies a blob or file to a destination file within the storage account."
parameters:
- description: "Specifies the URL of the source file or blob, up to 2 KB in length."
name: "sourceUrl"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata. Metadata names must adhere to the\n naming rules."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- description: "Duration between each poll for the copy status. If none is specified, a default of one second\n is used."
name: "pollInterval"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public SyncPoller<ShareFileCopyInfo,Void> beginCopy(String sourceUrl, Map<String,String> metadata, Duration pollInterval)"
desc: "Copies a blob or file to a destination file within the storage account.\n\n**Code Samples**\n\nCopy file from source getDirectoryUrl to the `resourcePath`\n\n```java\nSyncPoller<ShareFileCopyInfo, Void> poller = fileClient.beginCopy(\n \"https://{accountName}.file.core.windows.net?{SASToken}\",\n Collections.singletonMap(\"file\", \"metadata\"), Duration.ofSeconds(2));\n\n final PollResponse<ShareFileCopyInfo> pollResponse = poller.poll();\n final ShareFileCopyInfo value = pollResponse.getValue();\n System.out.printf(\"Copy source: %s. Status: %s.%n\", value.getCopySourceUrl(), value.getCopyStatus());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/copy-file"
returns:
description: "A <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to poll the progress of copy operation."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileCopyInfo?alt=com.azure.storage.file.share.models.ShareFileCopyInfo&text=ShareFileCopyInfo\" data-throw-if-not-resolved=\"False\" />,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRange(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRange(long length)"
name: "clearRange(long length)"
nameWithType: "ShareFileClient.clearRange(long length)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being cleared."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileUploadInfo clearRange(long length)"
desc: "Clears a range of bytes to specific of a file in storage file service. Clear operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClears the first 1024 bytes.\n\n```java\nShareFileUploadInfo response = fileClient.clearRange(1024);\n System.out.println(\"Complete clearing the range with eTag: \" + response.getETag());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long,long,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> clearRangeWithResponse(long length, long offset, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Clears a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClear the range starting from 1024 with length of 1024.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileUploadInfo> response = fileClient.clearRangeWithResponse(1024, 1024, requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete clearing the range with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long,long,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
name: "clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
nameWithType: "ShareFileClient.clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
summary: "Clears a range of bytes to specific of a file in storage file service."
parameters:
- description: "Specifies the number of bytes being transmitted in the request body."
name: "length"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "Starting point of the upload range, if <code>null</code> it will start from the beginning."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileUploadInfo> clearRangeWithResponse(long length, long offset, Duration timeout, Context context)"
desc: "Clears a range of bytes to specific of a file in storage file service. Upload operations performs an in-place write on the specified file.\n\n**Code Samples**\n\nClear the range starting from 1024 with length of 1024.\n\n```java\nResponse<ShareFileUploadInfo> response = fileClient.clearRangeWithResponse(1024, 1024,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete clearing the range with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/put-range"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileUploadInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file upload info\"></xref> with headers and response\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileUploadInfo?alt=com.azure.storage.file.share.models.ShareFileUploadInfo&text=ShareFileUploadInfo\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.create(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.create(long maxSize)"
name: "create(long maxSize)"
nameWithType: "ShareFileClient.create(long maxSize)"
summary: "Creates a file in the storage account and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileInfo\"></xref> to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileInfo create(long maxSize)"
desc: "Creates a file in the storage account and returns a response of <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileInfo\"></xref> to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers and metadata.\n\n```java\nShareFileInfo response = fileClient.create(1024);\n System.out.println(\"Complete creating the file.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "The <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Creates a file in the storage account and returns a response of Share<wbr>File<wbr>Info to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Creates a file in the storage account and returns a response of ShareFileInfo to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers, file smb properties and metadata.\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n\n Response<ShareFileInfo> response = fileClient.createWithResponse(1024, httpHeaders, smbProperties,\n filePermission, Collections.singletonMap(\"directory\", \"metadata\"), requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> and the status of creating the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long,com.azure.storage.file.share.models.ShareFileHttpHeaders,com.azure.storage.file.share.FileSmbProperties,java.lang.String,java.util.Map<java.lang.String,java.lang.String>,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
name: "createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
nameWithType: "ShareFileClient.createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
summary: "Creates a file in the storage account and returns a response of Share<wbr>File<wbr>Info to interact with it."
parameters:
- description: "The maximum size in bytes for the file."
name: "maxSize"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file http headers."
name: "httpHeaders"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileHttpHeaders?alt=com.azure.storage.file.share.models.ShareFileHttpHeaders&text=ShareFileHttpHeaders\" data-throw-if-not-resolved=\"False\" />"
- description: "The user settable file smb properties."
name: "smbProperties"
type: "<xref href=\"com.azure.storage.file.share.FileSmbProperties?alt=com.azure.storage.file.share.FileSmbProperties&text=FileSmbProperties\" data-throw-if-not-resolved=\"False\" />"
- description: "The file permission of the file."
name: "filePermission"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional name-value pairs associated with the file as metadata."
name: "metadata"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileInfo> createWithResponse(long maxSize, ShareFileHttpHeaders httpHeaders, FileSmbProperties smbProperties, String filePermission, Map<String,String> metadata, Duration timeout, Context context)"
desc: "Creates a file in the storage account and returns a response of ShareFileInfo to interact with it.\n\n**Code Samples**\n\nCreate the file with length of 1024 bytes, some headers, file smb properties and metadata.\n\n```java\nShareFileHttpHeaders httpHeaders = new ShareFileHttpHeaders()\n .setContentType(\"text/html\")\n .setContentEncoding(\"gzip\")\n .setContentLanguage(\"en\")\n .setCacheControl(\"no-transform\")\n .setContentDisposition(\"attachment\");\n FileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n String filePermission = \"filePermission\";\n // NOTE: filePermission and filePermissionKey should never be both set\n Response<ShareFileInfo> response = fileClient.createWithResponse(1024, httpHeaders, smbProperties,\n filePermission, Collections.singletonMap(\"directory\", \"metadata\"), Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.printf(\"Creating the file completed with status code %d\", response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/create-file"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileInfo\" data-throw-if-not-resolved=\"false\" data-raw-source=\"file info\"></xref> and the status of creating the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileInfo?alt=com.azure.storage.file.share.models.ShareFileInfo&text=ShareFileInfo\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.delete()"
fullName: "com.azure.storage.file.share.ShareFileClient.delete()"
name: "delete()"
nameWithType: "ShareFileClient.delete()"
summary: "Deletes the file associate with the client."
syntax: "public void delete()"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nfileClient.delete();\n System.out.println(\"Complete deleting the file.\");\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteIfExists()"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteIfExists()"
name: "deleteIfExists()"
nameWithType: "ShareFileClient.deleteIfExists()"
summary: "Deletes the file associate with the client if it exists."
syntax: "public boolean deleteIfExists()"
desc: "Deletes the file associate with the client if it exists.\n\n**Code Samples**\n\nDelete the file\n\n```java\nboolean result = fileClient.deleteIfExists();\n System.out.println(\"File deleted: \" + result);\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "<code>true</code> if the file is successfully deleted, <code>false</code> if the file does not exist."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file associate with the client if it exists."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> deleteIfExistsWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file associate with the client if it exists.\n\n**Code Samples**\n\nDelete the file\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Boolean> response = fileClient.deleteIfExistsWithResponse(requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n if (response.getStatusCode() == 404) {\n System.out.println(\"Does not exist.\");\n } else {\n System.out.printf(\"Delete completed with status %d%n\", response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response containing status code and HTTP headers. If <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref>'s status code is 202, the file\n was successfully deleted. If status code is 404, the file does not exist."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Deletes the file associate with the client."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.deleteWithResponse(requestConditions, Duration.ofSeconds(1),\n new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.deleteWithResponse(Duration timeout, Context context)"
name: "deleteWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.deleteWithResponse(Duration timeout, Context context)"
summary: "Deletes the file associate with the client."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Void> deleteWithResponse(Duration timeout, Context context)"
desc: "Deletes the file associate with the client.\n\n**Code Samples**\n\nDelete the file\n\n```java\nResponse<Void> response = fileClient.deleteWithResponse(Duration.ofSeconds(1), new Context(key1, value1));\n System.out.println(\"Complete deleting the file with status code: \" + response.getStatusCode());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/delete-file2"
returns:
description: "A response that only contains headers and response status code"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.download(java.io.OutputStream)"
fullName: "com.azure.storage.file.share.ShareFileClient.download(OutputStream stream)"
name: "download(OutputStream stream)"
nameWithType: "ShareFileClient.download(OutputStream stream)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
syntax: "public void download(OutputStream stream)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file with its metadata and properties.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n fileClient.download(stream);\n System.out.printf(\"Completed downloading the file with content: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFile(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFile(String downloadFilePath)"
name: "downloadToFile(String downloadFilePath)"
nameWithType: "ShareFileClient.downloadToFile(String downloadFilePath)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileProperties downloadToFile(String downloadFilePath)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file to current folder.\n\n```java\nfileClient.downloadToFile(\"somelocalfilepath\");\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file.\");\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The properties of the file."
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareFileRange,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes to current folder.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileProperties> response =\n fileClient.downloadToFileWithResponse(\"somelocalfilepath\", new ShareFileRange(1024, 2047L),\n requestConditions, Duration.ofSeconds(1), Context.NONE);\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file with status code \" + response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The response of the file properties."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(java.lang.String,com.azure.storage.file.share.models.ShareFileRange,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
name: "downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties into a file specified by the path."
parameters:
- description: "The path where store the downloaded file"
name: "downloadFilePath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> downloadToFileWithResponse(String downloadFilePath, ShareFileRange range, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties into a file specified by the path.\n\nThe file will be created and must not exist, if the file already exists a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"FileAlreadyExistsException\"></xref> will be thrown.\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes to current folder.\n\n```java\nResponse<ShareFileProperties> response =\n fileClient.downloadToFileWithResponse(\"somelocalfilepath\", new ShareFileRange(1024, 2047L),\n Duration.ofSeconds(1), Context.NONE);\n if (Files.exists(Paths.get(\"somelocalfilepath\"))) {\n System.out.println(\"Complete downloading the file with status code \" + response.getStatusCode());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "The response of the file properties."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.models.ShareFileRange,java.lang.Boolean,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "Optional boolean which the service returns the MD5 hash for the range when it sets to\n true, as long as the range is less than or equal to 4 MB in size."
name: "rangeGetContentMD5"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<Void> response = fileClient.downloadWithResponse(stream, new ShareFileRange(1024, 2047L), false,\n requestConditions, Duration.ofSeconds(30), new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.models.ShareFileRange,java.lang.Boolean,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "Optional boolean which the service returns the MD5 hash for the range when it sets to\n true, as long as the range is less than or equal to 4 MB in size."
name: "rangeGetContentMD5"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileRange range, Boolean rangeGetContentMD5, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n Response<Void> response = fileClient.downloadWithResponse(stream, new ShareFileRange(1024, 2047L), false,\n Duration.ofSeconds(30), new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(java.io.OutputStream,com.azure.storage.file.share.options.ShareFileDownloadOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
name: "downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
summary: "Downloads a file from the system, including its metadata and properties"
parameters:
- description: "A non-null <xref uid=\"java.io.OutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"OutputStream\"></xref> where the downloaded data will be written."
name: "stream"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html\">OutputStream</a>"
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileDownloadOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileDownloadOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileDownloadOptions?alt=com.azure.storage.file.share.options.ShareFileDownloadOptions&text=ShareFileDownloadOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ShareFileDownloadResponse downloadWithResponse(OutputStream stream, ShareFileDownloadOptions options, Duration timeout, Context context)"
desc: "Downloads a file from the system, including its metadata and properties\n\n**Code Samples**\n\nDownload the file from 1024 to 2048 bytes with its metadata and properties and without the contentMD5.\n\n```java\ntry {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n ShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n ShareFileRange range = new ShareFileRange(1024, 2047L);\n DownloadRetryOptions retryOptions = new DownloadRetryOptions().setMaxRetryRequests(3);\n ShareFileDownloadOptions options = new ShareFileDownloadOptions().setRange(range)\n .setRequestConditions(requestConditions)\n .setRangeContentMd5Requested(false)\n .setRetryOptions(retryOptions);\n Response<Void> response = fileClient.downloadWithResponse(stream, options, Duration.ofSeconds(30),\n new Context(key1, value1));\n\n System.out.printf(\"Completed downloading file with status code %d%n\", response.getStatusCode());\n System.out.printf(\"Content of the file is: %n%s%n\",\n new String(stream.toByteArray(), StandardCharsets.UTF_8));\n } catch (Throwable throwable) {\n System.err.printf(\"Downloading failed with exception. Message: %s%n\", throwable.getMessage());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file"
returns:
description: "A response containing the headers and response status code"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileDownloadResponse?alt=com.azure.storage.file.share.models.ShareFileDownloadResponse&text=ShareFileDownloadResponse\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.exists()"
fullName: "com.azure.storage.file.share.ShareFileClient.exists()"
name: "exists()"
nameWithType: "ShareFileClient.exists()"
summary: "Determines if the file this client represents exists in the cloud."
syntax: "public Boolean exists()"
desc: "Determines if the file this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nSystem.out.printf(\"Exists? %b%n\", client.exists());\n```"
returns:
description: "Flag indicating existence of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.existsWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.existsWithResponse(Duration timeout, Context context)"
name: "existsWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.existsWithResponse(Duration timeout, Context context)"
summary: "Determines if the file this client represents exists in the cloud."
parameters:
- description: "An optional timeout value beyond which a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be raised."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<Boolean> existsWithResponse(Duration timeout, Context context)"
desc: "Determines if the file this client represents exists in the cloud.\n\n**Code Samples**\n\n```java\nContext context = new Context(\"Key\", \"Value\");\n System.out.printf(\"Exists? %b%n\", client.existsWithResponse(timeout, context).getValue());\n```"
returns:
description: "Flag indicating existence of the file."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html\">Boolean</a>>"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseAllHandles(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseAllHandles(Duration timeout, Context context)"
name: "forceCloseAllHandles(Duration timeout, Context context)"
nameWithType: "ShareFileClient.forceCloseAllHandles(Duration timeout, Context context)"
summary: "Closes all handles opened on the file at the service."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public CloseHandlesInfo forceCloseAllHandles(Duration timeout, Context context)"
desc: "Closes all handles opened on the file at the service.\n\n**Code Samples**\n\nForce close all handles.\n\n```java\nCloseHandlesInfo closeHandlesInfo = fileClient.forceCloseAllHandles(Duration.ofSeconds(30), Context.NONE);\n System.out.printf(\"Closed %d open handles on the file%n\", closeHandlesInfo.getClosedHandles());\n System.out.printf(\"Failed to close %d open handles on the file%n\", closeHandlesInfo.getFailedHandles());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "Information about the closed handles"
type: "<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseHandle(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseHandle(String handleId)"
name: "forceCloseHandle(String handleId)"
nameWithType: "ShareFileClient.forceCloseHandle(String handleId)"
summary: "Closes a handle on the file at the service."
parameters:
- description: "Handle ID to be closed."
name: "handleId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public CloseHandlesInfo forceCloseHandle(String handleId)"
desc: "Closes a handle on the file at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareFileClient.listHandles()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles()\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nfileClient.listHandles().forEach(handleItem -> {\n fileClient.forceCloseHandle(handleItem.getHandleId());\n System.out.printf(\"Closed handle %s on resource %s%n\", handleItem.getHandleId(), handleItem.getPath());\n });\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "Information about the closed handles."
type: "<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.forceCloseHandleWithResponse(java.lang.String,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
name: "forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
nameWithType: "ShareFileClient.forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
summary: "Closes a handle on the file at the service."
parameters:
- description: "Handle ID to be closed."
name: "handleId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<CloseHandlesInfo> forceCloseHandleWithResponse(String handleId, Duration timeout, Context context)"
desc: "Closes a handle on the file at the service. This is intended to be used alongside <xref uid=\"com.azure.storage.file.share.ShareFileClient.listHandles()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#listHandles()\"></xref>.\n\n**Code Samples**\n\nForce close handles returned by list handles.\n\n```java\nfileClient.listHandles().forEach(handleItem -> {\n Response<CloseHandlesInfo> closeResponse = fileClient\n .forceCloseHandleWithResponse(handleItem.getHandleId(), Duration.ofSeconds(30), Context.NONE);\n System.out.printf(\"Closing handle %s on resource %s completed with status code %d%n\",\n handleItem.getHandleId(), handleItem.getPath(), closeResponse.getStatusCode());\n });\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/force-close-handles"
returns:
description: "A response that contains information about the closed handles, headers and response status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.CloseHandlesInfo?alt=com.azure.storage.file.share.models.CloseHandlesInfo&text=CloseHandlesInfo\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues)"
fullName: "com.azure.storage.file.share.ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
nameWithType: "ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
summary: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues)"
desc: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareFileSasPermission permission = new ShareFileSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n shareFileClient.generateSas(values); // Client must be authenticated via StorageSharedKeyCredential\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.generateSas(com.azure.storage.file.share.sas.ShareServiceSasSignatureValues,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
name: "generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
nameWithType: "ShareFileClient.generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
summary: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>"
name: "shareServiceSasSignatureValues"
type: "<xref href=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues?alt=com.azure.storage.file.share.sas.ShareServiceSasSignatureValues&text=ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"False\" />"
- description: "Additional context that is passed through the code when generating a SAS."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public String generateSas(ShareServiceSasSignatureValues shareServiceSasSignatureValues, Context context)"
desc: "Generates a service SAS for the file using the specified <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref>\n\nNote : The client must be authenticated via <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageSharedKeyCredential\"></xref>\n\nSee <xref uid=\"com.azure.storage.file.share.sas.ShareServiceSasSignatureValues\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareServiceSasSignatureValues\"></xref> for more information on how to construct a service SAS.\n\n**Code Samples**\n\n```java\nOffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);\n ShareFileSasPermission permission = new ShareFileSasPermission().setReadPermission(true);\n\n ShareServiceSasSignatureValues values = new ShareServiceSasSignatureValues(expiryTime, permission)\n .setStartTime(OffsetDateTime.now());\n\n // Client must be authenticated via StorageSharedKeyCredential\n shareFileClient.generateSas(values, new Context(\"key\", \"value\"));\n```"
returns:
description: "A <code>String</code> representing the SAS query parameters."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getAccountName()"
fullName: "com.azure.storage.file.share.ShareFileClient.getAccountName()"
name: "getAccountName()"
nameWithType: "ShareFileClient.getAccountName()"
summary: "Get associated account name."
syntax: "public String getAccountName()"
desc: "Get associated account name."
returns:
description: "account name associated with this storage resource."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getAccountUrl()"
fullName: "com.azure.storage.file.share.ShareFileClient.getAccountUrl()"
name: "getAccountUrl()"
nameWithType: "ShareFileClient.getAccountUrl()"
summary: "Get the url of the storage account."
syntax: "public String getAccountUrl()"
desc: "Get the url of the storage account."
returns:
description: "the URL of the storage account"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream()"
name: "getFileOutputStream()"
nameWithType: "ShareFileClient.getFileOutputStream()"
summary: "Creates and opens an output stream to write data to the file."
modifiers:
- "final"
syntax: "public final StorageFileOutputStream getFileOutputStream()"
desc: "Creates and opens an output stream to write data to the file. If the file already exists on the service, it will be overwritten."
returns:
description: "A <xref uid=\"com.azure.storage.file.share.StorageFileOutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageFileOutputStream\"></xref> object used to write data to the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileOutputStream?alt=com.azure.storage.file.share.StorageFileOutputStream&text=StorageFileOutputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream(long)"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileOutputStream(long offset)"
name: "getFileOutputStream(long offset)"
nameWithType: "ShareFileClient.getFileOutputStream(long offset)"
summary: "Creates and opens an output stream to write data to the file."
modifiers:
- "final"
parameters:
- description: "Starting point of the upload range."
name: "offset"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final StorageFileOutputStream getFileOutputStream(long offset)"
desc: "Creates and opens an output stream to write data to the file. If the file already exists on the service, it will be overwritten."
returns:
description: "A <xref uid=\"com.azure.storage.file.share.StorageFileOutputStream\" data-throw-if-not-resolved=\"false\" data-raw-source=\"StorageFileOutputStream\"></xref> object used to write data to the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileOutputStream?alt=com.azure.storage.file.share.StorageFileOutputStream&text=StorageFileOutputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getFilePath()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFilePath()"
name: "getFilePath()"
nameWithType: "ShareFileClient.getFilePath()"
summary: "Get file path of the client."
syntax: "public String getFilePath()"
desc: "Get file path of the client.\n\nGet the file path.\n\n```java\nString filePath = fileClient.getFilePath();\n System.out.println(\"The name of the file is \" + filePath);\n```"
returns:
description: "The path of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileSeekableByteChannelRead(com.azure.storage.file.share.options.ShareFileSeekableByteChannelReadOptions)"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileSeekableByteChannelRead(ShareFileSeekableByteChannelReadOptions options)"
name: "getFileSeekableByteChannelRead(ShareFileSeekableByteChannelReadOptions options)"
nameWithType: "ShareFileClient.getFileSeekableByteChannelRead(ShareFileSeekableByteChannelReadOptions options)"
summary: "Creates and opens a <xref uid=\"java.nio.channels.SeekableByteChannel\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SeekableByteChannel\"></xref> to read data from the file."
parameters:
- description: "Options for opening the channel."
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileSeekableByteChannelReadOptions?alt=com.azure.storage.file.share.options.ShareFileSeekableByteChannelReadOptions&text=ShareFileSeekableByteChannelReadOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SeekableByteChannel getFileSeekableByteChannelRead(ShareFileSeekableByteChannelReadOptions options)"
desc: "Creates and opens a <xref uid=\"java.nio.channels.SeekableByteChannel\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SeekableByteChannel\"></xref> to read data from the file."
returns:
description: "The opened channel."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/nio/channels/SeekableByteChannel.html\">SeekableByteChannel</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileSeekableByteChannelWrite(com.azure.storage.file.share.options.ShareFileSeekableByteChannelWriteOptions)"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileSeekableByteChannelWrite(ShareFileSeekableByteChannelWriteOptions options)"
name: "getFileSeekableByteChannelWrite(ShareFileSeekableByteChannelWriteOptions options)"
nameWithType: "ShareFileClient.getFileSeekableByteChannelWrite(ShareFileSeekableByteChannelWriteOptions options)"
summary: "Creates and opens a <xref uid=\"java.nio.channels.SeekableByteChannel\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SeekableByteChannel\"></xref> to write data to the file."
parameters:
- description: "Options for opening the channel."
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileSeekableByteChannelWriteOptions?alt=com.azure.storage.file.share.options.ShareFileSeekableByteChannelWriteOptions&text=ShareFileSeekableByteChannelWriteOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public SeekableByteChannel getFileSeekableByteChannelWrite(ShareFileSeekableByteChannelWriteOptions options)"
desc: "Creates and opens a <xref uid=\"java.nio.channels.SeekableByteChannel\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SeekableByteChannel\"></xref> to write data to the file."
returns:
description: "The opened channel."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/nio/channels/SeekableByteChannel.html\">SeekableByteChannel</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getFileUrl()"
fullName: "com.azure.storage.file.share.ShareFileClient.getFileUrl()"
name: "getFileUrl()"
nameWithType: "ShareFileClient.getFileUrl()"
summary: "Get the url of the storage file client."
syntax: "public String getFileUrl()"
desc: "Get the url of the storage file client."
returns:
description: "the URL of the storage file client."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getHttpPipeline()"
fullName: "com.azure.storage.file.share.ShareFileClient.getHttpPipeline()"
name: "getHttpPipeline()"
nameWithType: "ShareFileClient.getHttpPipeline()"
summary: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
syntax: "public HttpPipeline getHttpPipeline()"
desc: "Gets the <xref uid=\"com.azure.core.http.HttpPipeline\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpPipeline\"></xref> powering this client."
returns:
description: "The pipeline."
type: "<xref href=\"com.azure.core.http.HttpPipeline?alt=com.azure.core.http.HttpPipeline&text=HttpPipeline\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getProperties()"
fullName: "com.azure.storage.file.share.ShareFileClient.getProperties()"
name: "getProperties()"
nameWithType: "ShareFileClient.getProperties()"
summary: "Retrieves the properties of the storage account's file."
syntax: "public ShareFileProperties getProperties()"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nShareFileProperties properties = fileClient.getProperties();\n System.out.printf(\"File latest modified date is %s.\", properties.getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref>"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "Retrieves the properties of the storage account's file."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> getPropertiesWithResponse(ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Response<ShareFileProperties> response = fileClient.getPropertiesWithResponse(requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"File latest modified date is %s.\", response.getValue().getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref> with headers and\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.getPropertiesWithResponse(Duration timeout, Context context)"
name: "getPropertiesWithResponse(Duration timeout, Context context)"
nameWithType: "ShareFileClient.getPropertiesWithResponse(Duration timeout, Context context)"
summary: "Retrieves the properties of the storage account's file."
parameters:
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileProperties> getPropertiesWithResponse(Duration timeout, Context context)"
desc: "Retrieves the properties of the storage account's file. The properties include file metadata, last modified date, is server encrypted, and eTag.\n\n**Code Samples**\n\nRetrieve file properties\n\n```java\nResponse<ShareFileProperties> response = fileClient.getPropertiesWithResponse(\n Duration.ofSeconds(1), new Context(key1, value1));\n System.out.printf(\"File latest modified date is %s.\", response.getValue().getLastModified());\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/get-file-properties"
returns:
description: "A response containing the <xref uid=\"com.azure.storage.file.share.models.ShareFileProperties\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Storage file properties\"></xref> with headers and\n status code."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileProperties?alt=com.azure.storage.file.share.models.ShareFileProperties&text=ShareFileProperties\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.getServiceVersion()"
fullName: "com.azure.storage.file.share.ShareFileClient.getServiceVersion()"
name: "getServiceVersion()"
nameWithType: "ShareFileClient.getServiceVersion()"
summary: "Gets the service version the client is using."
syntax: "public ShareServiceVersion getServiceVersion()"
desc: "Gets the service version the client is using."
returns:
description: "the service version the client is using."
type: "<xref href=\"com.azure.storage.file.share.ShareServiceVersion?alt=com.azure.storage.file.share.ShareServiceVersion&text=ShareServiceVersion\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.getShareName()"
fullName: "com.azure.storage.file.share.ShareFileClient.getShareName()"
name: "getShareName()"
nameWithType: "ShareFileClient.getShareName()"
summary: "Get the share name of file client."
syntax: "public String getShareName()"
desc: "Get the share name of file client.\n\nGet the share name.\n\n```java\nString shareName = fileClient.getShareName();\n System.out.println(\"The share name of the directory is \" + shareName);\n```"
returns:
description: "The share name of the file."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.getShareSnapshotId()"
fullName: "com.azure.storage.file.share.ShareFileClient.getShareSnapshotId()"
name: "getShareSnapshotId()"
nameWithType: "ShareFileClient.getShareSnapshotId()"
summary: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref>."
syntax: "public String getShareSnapshotId()"
desc: "Get snapshot id which attached to <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref>. Return `null` if no snapshot id attached.\n\n**Code Samples**\n\nGet the share snapshot id.\n\n```java\nOffsetDateTime currentTime = OffsetDateTime.of(LocalDateTime.now(), ZoneOffset.UTC);\n ShareFileClient fileClient = new ShareFileClientBuilder()\n .endpoint(\"https://${accountName}.file.core.windows.net\")\n .sasToken(\"${SASToken}\")\n .shareName(\"myshare\")\n .resourcePath(\"myfile\")\n .snapshot(currentTime.toString())\n .buildFileClient();\n\n System.out.printf(\"Snapshot ID: %s%n\", fileClient.getShareSnapshotId());\n```"
returns:
description: "The snapshot id which is a unique <code>DateTime</code> value that identifies the share snapshot to its base\n share."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.storage.file.share.ShareFileClient.listHandles()"
fullName: "com.azure.storage.file.share.ShareFileClient.listHandles()"
name: "listHandles()"
nameWithType: "ShareFileClient.listHandles()"
summary: "List of open handles on a file."
syntax: "public PagedIterable<HandleItem> listHandles()"
desc: "List of open handles on a file.\n\n**Code Samples**\n\nList all handles for the file client.\n\n```java\nfileClient.listHandles()\n .forEach(handleItem -> System.out.printf(\"List handles completed with handleId %s\",\n handleItem.getHandleId()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-handles"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.HandleItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"handles\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.HandleItem?alt=com.azure.storage.file.share.models.HandleItem&text=HandleItem\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.listHandles(java.lang.Integer,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
name: "listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
summary: "List of open handles on a file."
parameters:
- description: "Optional max number of results returned per page"
name: "maxResultsPerPage"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html\">Integer</a>"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<HandleItem> listHandles(Integer maxResultsPerPage, Duration timeout, Context context)"
desc: "List of open handles on a file.\n\n**Code Samples**\n\nList 10 handles for the file client.\n\n```java\nfileClient.listHandles(10, Duration.ofSeconds(1), new Context(key1, value1))\n .forEach(handleItem -> System.out.printf(\"List handles completed with handleId %s\",\n handleItem.getHandleId()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-handles"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.HandleItem\" data-throw-if-not-resolved=\"false\" data-raw-source=\"handles\"></xref> in the file that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.HandleItem?alt=com.azure.storage.file.share.models.HandleItem&text=HandleItem\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges()"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges()"
name: "listRanges()"
nameWithType: "ShareFileClient.listRanges()"
summary: "List of valid ranges for a file."
syntax: "public PagedIterable<ShareFileRange> listRanges()"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges for the file client.\n\n```java\nIterable<ShareFileRange> ranges = fileClient.listRanges();\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files."
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges(com.azure.storage.file.share.models.ShareFileRange,com.azure.storage.file.share.models.ShareRequestConditions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
name: "listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareRequestConditions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareRequestConditions\"></xref>"
name: "requestConditions"
type: "<xref href=\"com.azure.storage.file.share.models.ShareRequestConditions?alt=com.azure.storage.file.share.models.ShareRequestConditions&text=ShareRequestConditions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<ShareFileRange> listRanges(ShareFileRange range, ShareRequestConditions requestConditions, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareRequestConditions requestConditions = new ShareRequestConditions().setLeaseId(leaseId);\n Iterable<ShareFileRange> ranges = fileClient.listRanges(new ShareFileRange(1024, 2048L), requestConditions,\n Duration.ofSeconds(1), new Context(key1, value1));\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.listRanges(com.azure.storage.file.share.models.ShareFileRange,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRanges(ShareFileRange range, Duration timeout, Context context)"
name: "listRanges(ShareFileRange range, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRanges(ShareFileRange range, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "Optional byte range which returns file data only from the specified range."
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public PagedIterable<ShareFileRange> listRanges(ShareFileRange range, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nIterable<ShareFileRange> ranges = fileClient.listRanges(new ShareFileRange(1024, 2048L), Duration.ofSeconds(1),\n new Context(key1, value1));\n ranges.forEach(range ->\n System.out.printf(\"List ranges completed with start: %d, end: %d\", range.getStart(), range.getEnd()));\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.PagedIterable?alt=com.azure.core.http.rest.PagedIterable&text=PagedIterable\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.listRangesDiff(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRangesDiff(String previousSnapshot)"
name: "listRangesDiff(String previousSnapshot)"
nameWithType: "ShareFileClient.listRangesDiff(String previousSnapshot)"
summary: "List of valid ranges for a file."
parameters:
- description: "Specifies that the response will contain only ranges that were changed between target\n file and previous snapshot. Changed ranges include both updated and cleared ranges. The target file may be a\n snapshot, as long as the snapshot specified by previousSnapshot is the older of the two."
name: "previousSnapshot"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileRangeList listRangesDiff(String previousSnapshot)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareFileRangeList rangeList = fileClient.listRangesDiff(\"previoussnapshot\");\n System.out.println(\"Valid Share File Ranges are:\");\n for (FileRange range : rangeList.getRanges()) {\n System.out.printf(\"Start: %s, End: %s%n\", range.getStart(), range.getEnd());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRangeList?alt=com.azure.storage.file.share.models.ShareFileRangeList&text=ShareFileRangeList\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.listRangesDiffWithResponse(com.azure.storage.file.share.options.ShareFileListRangesDiffOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
name: "listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
summary: "List of valid ranges for a file."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileListRangesDiffOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileListRangesDiffOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileListRangesDiffOptions?alt=com.azure.storage.file.share.options.ShareFileListRangesDiffOptions&text=ShareFileListRangesDiffOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileRangeList> listRangesDiffWithResponse(ShareFileListRangesDiffOptions options, Duration timeout, Context context)"
desc: "List of valid ranges for a file.\n\n**Code Samples**\n\nList all ranges within the file range from 1KB to 2KB.\n\n```java\nShareFileRangeList rangeList = fileClient.listRangesDiffWithResponse(\n new ShareFileListRangesDiffOptions(\"previoussnapshot\")\n .setRange(new ShareFileRange(1024, 2048L)), Duration.ofSeconds(1), new Context(key1, value1)).getValue();\n System.out.println(\"Valid Share File Ranges are:\");\n for (FileRange range : rangeList.getRanges()) {\n System.out.printf(\"Start: %s, End: %s%n\", range.getStart(), range.getEnd());\n }\n```\n\nFor more information, see the [Azure Docs][].\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/list-ranges"
returns:
description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ranges\"></xref> in the files that satisfy the requirements"
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.models.ShareFileRangeList?alt=com.azure.storage.file.share.models.ShareFileRangeList&text=ShareFileRangeList\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.openInputStream()"
fullName: "com.azure.storage.file.share.ShareFileClient.openInputStream()"
name: "openInputStream()"
nameWithType: "ShareFileClient.openInputStream()"
summary: "Opens a file input stream to download the file."
modifiers:
- "final"
syntax: "public final StorageFileInputStream openInputStream()"
desc: "Opens a file input stream to download the file."
returns:
description: "An <code>InputStream</code> object that represents the stream to use for reading from the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileInputStream?alt=com.azure.storage.file.share.StorageFileInputStream&text=StorageFileInputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.openInputStream(com.azure.storage.file.share.models.ShareFileRange)"
fullName: "com.azure.storage.file.share.ShareFileClient.openInputStream(ShareFileRange range)"
name: "openInputStream(ShareFileRange range)"
nameWithType: "ShareFileClient.openInputStream(ShareFileRange range)"
summary: "Opens a file input stream to download the specified range of the file."
modifiers:
- "final"
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.models.ShareFileRange\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileRange\"></xref>"
name: "range"
type: "<xref href=\"com.azure.storage.file.share.models.ShareFileRange?alt=com.azure.storage.file.share.models.ShareFileRange&text=ShareFileRange\" data-throw-if-not-resolved=\"False\" />"
syntax: "public final StorageFileInputStream openInputStream(ShareFileRange range)"
desc: "Opens a file input stream to download the specified range of the file."
returns:
description: "An <code>InputStream</code> object that represents the stream to use for reading from the file."
type: "<xref href=\"com.azure.storage.file.share.StorageFileInputStream?alt=com.azure.storage.file.share.StorageFileInputStream&text=StorageFileInputStream\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.rename(java.lang.String)"
fullName: "com.azure.storage.file.share.ShareFileClient.rename(String destinationPath)"
name: "rename(String destinationPath)"
nameWithType: "ShareFileClient.rename(String destinationPath)"
summary: "Moves the file to another location within the share."
parameters:
- description: "Relative path from the share to rename the file to."
name: "destinationPath"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ShareFileClient rename(String destinationPath)"
desc: "Moves the file to another location within the share. For more information see the [Azure Docs][].\n\n**Code Samples**\n\n```java\nShareFileClient renamedClient = client.rename(destinationPath);\n System.out.println(\"File Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-file"
returns:
description: "A <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> used to interact with the new file created."
type: "<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.storage.file.share.ShareFileClient.renameWithResponse(com.azure.storage.file.share.options.ShareFileRenameOptions,java.time.Duration,com.azure.core.util.Context)"
fullName: "com.azure.storage.file.share.ShareFileClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
name: "renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
nameWithType: "ShareFileClient.renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
summary: "Moves the file to another location within the share."
parameters:
- description: "<xref uid=\"com.azure.storage.file.share.options.ShareFileRenameOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileRenameOptions\"></xref>"
name: "options"
type: "<xref href=\"com.azure.storage.file.share.options.ShareFileRenameOptions?alt=com.azure.storage.file.share.options.ShareFileRenameOptions&text=ShareFileRenameOptions\" data-throw-if-not-resolved=\"False\" />"
- description: "An optional timeout applied to the operation. If a response is not returned before the timeout\n concludes a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"RuntimeException\"></xref> will be thrown."
name: "timeout"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- description: "Additional context that is passed through the Http pipeline during the service call."
name: "context"
type: "<xref href=\"com.azure.core.util.Context?alt=com.azure.core.util.Context&text=Context\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Response<ShareFileClient> renameWithResponse(ShareFileRenameOptions options, Duration timeout, Context context)"
desc: "Moves the file to another location within the share. For more information see the [Azure Docs][].\n\n**Code Samples**\n\n```java\nFileSmbProperties smbProperties = new FileSmbProperties()\n .setNtfsFileAttributes(EnumSet.of(NtfsFileAttributes.READ_ONLY))\n .setFileCreationTime(OffsetDateTime.now())\n .setFileLastWriteTime(OffsetDateTime.now())\n .setFilePermissionKey(\"filePermissionKey\");\n ShareFileRenameOptions options = new ShareFileRenameOptions(destinationPath)\n .setDestinationRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))\n .setSourceRequestConditions(new ShareRequestConditions().setLeaseId(leaseId))\n .setIgnoreReadOnly(false)\n .setReplaceIfExists(false)\n .setFilePermission(\"filePermission\")\n .setSmbProperties(smbProperties);\n\n ShareFileClient newRenamedClient = client.renameWithResponse(options, timeout, new Context(key1, value1))\n .getValue();\n System.out.println(\"File Client has been renamed\");\n```\n\n\n[Azure Docs]: https://docs.microsoft.com/rest/api/storageservices/rename-file"
returns:
description: "A <xref uid=\"com.azure.core.http.rest.Response\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Response\"></xref> whose <xref uid=\"com.azure.core.http.rest.Response.getValue*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"value\"></xref> contains a <xref uid=\"com.azure.storage.file.share.ShareFileClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ShareFileClient\"></xref> used to\n interact with the file created."
type: "<xref href=\"com.azure.core.http.rest.Response?alt=com.azure.core.http.rest.Response&text=Response\" data-throw-if-not-resolved=\"False\" /><<xref href=\"com.azure.storage.file.share.ShareFileClient?alt=com.azure.storage.file.share.ShareFileClient&text=ShareFileClient\" data-throw-if-not-resolved=\"False\" />>"
- uid: "com.azure.storage.file.share.ShareFileClient.setMetadata(java.util.Map<java.lang.String,java.lang.String>)"
fullName: "com.azure.storage.file.share.ShareFileClient.setMetadata(Map<String,String> metadata)"
name: "setMetadata(Map<String,String> metadata)"