-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hub/delete-project: expand functionality and acutally delete files
- Loading branch information
1 parent
d8f481c
commit 31a9137
Showing
5 changed files
with
62 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. | ||
* License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details | ||
*/ | ||
|
||
// This is used to find files on the share server (public_paths) in "next" | ||
// and also in the hub, for deleting shared files of projects | ||
|
||
import { join } from "node:path"; | ||
|
||
import { projects } from "@cocalc/backend/data"; | ||
|
||
// Given a project_id/path, return the directory on the file system where | ||
// that path should be located. | ||
export function pathToFiles(project_id: string, path: string): string { | ||
return join(projects.replace("[project_id]", project_id), path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters