@@ -96,7 +96,7 @@ from azureml.fsspec import AzureMachineLearningFileSystem
96
96
# instantiate file system using following URI
97
97
fs = AzureMachineLearningFileSystem(' azureml://subscriptions/<subid>/resourcegroups/<rgname>/workspaces/<workspace_name>/datastore/datastorename' )
98
98
99
- fs.ls() # list folders/files in datastore datastorename
99
+ fs.ls() # list folders/files in datastore ' datastorename'
100
100
101
101
# output example:
102
102
# folder1
@@ -122,6 +122,8 @@ fs.upload(lpath='data/upload_files/crime-spring.csv', rpath='data/fsspec', recur
122
122
# you need to specify recursive as True to upload a folder
123
123
fs.upload(lpath = ' data/upload_folder/' , rpath = ' data/fsspec_folder' , recursive = True , ** {' overwrite' : MERGE_WITH_OVERWRITE })
124
124
```
125
+ ` lpath ` is the local path, and ` rpath ` is the remote path.
126
+ If the folders you specify in ` rpath ` do not exist yet, we will create the folders for you.
125
127
126
128
We support 3 modes for 'overwrite':
127
129
- APPEND: if there is already a file with the same name in the destination path, will keep the original file
@@ -131,7 +133,7 @@ We support 3 modes for 'overwrite':
131
133
### Download files via AzureMachineLearningFileSystem
132
134
``` python
133
135
# you can specify recursive as False to download a file
134
- # downloading overwrite option is set to be MERGE_WITH_OVERWRITE
136
+ # downloading overwrite option is determined by local system, and it is MERGE_WITH_OVERWRITE
135
137
fs.download(rpath = ' data/fsspec/crime-spring.csv' , lpath = ' data/download_files/, recursive=False)
136
138
137
139
# you need to specify recursive as True to download a folder
@@ -207,7 +209,7 @@ fs = AzureMachineLearningFileSystem(uri)
207
209
208
210
# append csv files in folder to a list
209
211
dflist = []
210
- for path in fs.ls (' /<folder>/*.parquet' ):
212
+ for path in fs.glob (' /<folder>/*.parquet' ):
211
213
with fs.open(path) as f:
212
214
dflist.append(pd.read_parquet(f))
213
215
0 commit comments