@@ -89,7 +89,7 @@ func (s *svc) doSearchFiles(w http.ResponseWriter, r *http.Request, sf *reportSe
89
89
}
90
90
91
91
// TODO(salfagem): hardcoded path for the time being:
92
- ref := & provider.Reference {Path : "/eos/project/c/cernbox " }
92
+ ref := & provider.Reference {Path : "/eos/project/t/test " }
93
93
94
94
req := & provider.ListContainerRequest {Opaque : & typespb.Opaque {
95
95
Map : opaqueMap ,
@@ -103,52 +103,52 @@ func (s *svc) doSearchFiles(w http.ResponseWriter, r *http.Request, sf *reportSe
103
103
return
104
104
}
105
105
106
+ log .Debug ().Msgf ("search: found %d matches" , len (res .Infos ))
107
+
106
108
for _ , v := range res .Infos {
107
109
log .Debug ().Msg (v .Path )
108
110
}
109
111
110
112
data := `
111
- <?xml version="1.0" encoding="UTF-8"?>
112
- <d:multistatus xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
113
- <d:response>
114
- <d:href>/remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51/asd.txt</d:href>
115
- <d:propstat>
116
- <d:prop>
117
- <oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51!d5613880-307c-4e3e-b56d-97839fcf6d03</oc:fileid>
118
- <oc:file-parent>1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51!4c510ada-c86b-4815-8820-42cdf82c3d51</oc:file-parent>
119
- <oc:name>asd.txt</oc:name>
120
- <d:getlastmodified>2022-11-08T10:45:16Z</d:getlastmodified>
121
- <d:getcontenttype>text/plain</d:getcontenttype>
122
- <oc:permissions>RDNVW</oc:permissions>
123
- <d:getetag />
124
- <d:resourcetype />
125
- <d:getcontentlength>0</d:getcontentlength>
126
- <oc:score>0.4809828996658325</oc:score>
127
- </d:prop>
128
- <d:status>HTTP/1.1 200 OK</d:status>
129
- </d:propstat>
130
- </d:response>
131
- <d:response>
132
- <d:href>/remote.php/dav/spaces/1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51/asdddddd</d:href>
133
- <d:propstat>
134
- <d:prop>
135
- <oc:fileid>1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51!fa3c7a85-5fc4-46d3-a0b1-293a282da1b7</oc:fileid>
136
- <oc:file-parent>1284d238-aa92-42ce-bdc4-0b0000009157$4c510ada-c86b-4815-8820-42cdf82c3d51!4c510ada-c86b-4815-8820-42cdf82c3d51</oc:file-parent>
137
- <oc:name>asdddddd</oc:name>
138
- <d:getlastmodified>2022-11-08T10:45:32Z</d:getlastmodified>
139
- <d:getcontenttype>httpd/unix-directory</d:getcontenttype>
140
- <oc:permissions>RDNVCK</oc:permissions>
141
- <d:getetag />
142
- <d:resourcetype>
143
- <d:collection />
144
- </d:resourcetype>
145
- <oc:size>0</oc:size>
146
- <oc:score>0.4809828996658325</oc:score>
147
- </d:prop>
148
- <d:status>HTTP/1.1 200 OK</d:status>
149
- </d:propstat>
150
- </d:response>
151
- </d:multistatus>
113
+ <?xml version="1.0" encoding="UTF-8"?>
114
+ <d:multistatus xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:s="http://sabredav.org/ns">
115
+ <d:response>
116
+ <d:href>/remote.php/dav/files/cboxbot/eos/project/c/cernbox/New%20folder</d:href>
117
+ <d:propstat>
118
+ <d:prop>
119
+ <oc:fileid>newproject-c!12202852</oc:fileid>
120
+ <oc:file-parent>newproject-c!12202851</oc:file-parent>
121
+ <oc:name>New folder</oc:name>
122
+ <d:getlastmodified>2022-12-05T16:12:20Z</d:getlastmodified>
123
+ <d:getcontenttype>httpd/unix-directory</d:getcontenttype>
124
+ <oc:permissions>SRDNVCKZ</oc:permissions>
125
+ <d:getetag />
126
+ <d:resourcetype>
127
+ <d:collection />
128
+ </d:resourcetype>
129
+ <oc:size>416606</oc:size>
130
+ </d:prop>
131
+ <d:status>HTTP/1.1 200 OK</d:status>
132
+ </d:propstat>
133
+ </d:response>
134
+ <d:response>
135
+ <d:href>/remote.php/dav/files/cboxbot/eos/project/c/cernbox/New%20folder/New%20file.txt</d:href>
136
+ <d:propstat>
137
+ <d:prop>
138
+ <oc:fileid>newproject-c!12202853</oc:fileid>
139
+ <oc:file-parent>newproject-c!12202852</oc:file-parent>
140
+ <oc:name>New file.txt</oc:name>
141
+ <d:getlastmodified>2022-12-05T16:12:20Z</d:getlastmodified>
142
+ <d:getcontenttype>text/plain</d:getcontenttype>
143
+ <oc:permissions>SRDNVCKZ</oc:permissions>
144
+ <d:getetag />
145
+ <d:resourcetype />
146
+ <d:getcontentlength>30</d:getcontentlength>
147
+ </d:prop>
148
+ <d:status>HTTP/1.1 200 OK</d:status>
149
+ </d:propstat>
150
+ </d:response>
151
+ </d:multistatus>
152
152
`
153
153
w .Write ([]byte (data ))
154
154
w .WriteHeader (207 )
0 commit comments