Download wp-calypso/client/my-sites/backup/paths.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/backup/paths.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/my-sites/backup/paths.ts
-
curl -L -o paths.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/backup/paths.ts
1.07 kB
| import { addQueryArgs } from 'calypso/lib/url'; | |
| export const backupMainPath = ( siteName?: string | null, query = {} ) => | |
| siteName ? addQueryArgs( query, `/backup/${ siteName }` ) : '/backup'; | |
| const backupSubSectionPath = ( | |
| siteName: string, | |
| subSection: string, | |
| subSectionId?: string | null | |
| ) => | |
| subSectionId | |
| ? `/backup/${ siteName }/${ subSection }/${ subSectionId }` | |
| : `/backup/${ siteName }/${ subSection }`; | |
| export const backupRestorePath = ( siteName: string, rewindId: string ) => | |
| backupSubSectionPath( siteName, 'restore', rewindId ); | |
| export const backupDownloadPath = ( siteName: string, rewindId: string ) => | |
| backupSubSectionPath( siteName, 'download', rewindId ); | |
| export const backupClonePath = ( siteName: string ) => backupSubSectionPath( siteName, 'clone' ); | |
| export const backupContentsPath = ( siteName: string, rewindId: string ) => | |
| backupSubSectionPath( siteName, 'contents', rewindId ); | |
| export const backupGranularRestorePath = ( siteName: string, rewindId: string ) => | |
| backupSubSectionPath( siteName, 'granular-restore', rewindId ); | |