Download scripts/stride/filename.c from OneScience-Group/Chainsaw: direct link, hf CLI and curl.
- Browser
- Download file 522 Bytes
-
https://huggingface.co/OneScience-Group/Chainsaw/resolve/main/scripts/stride/filename.c
- Command line
-
hf download hf://OneScience-Group/Chainsaw/scripts/stride/filename.c
-
curl -L -o filename.c https://huggingface.co/OneScience-Group/Chainsaw/resolve/main/scripts/stride/filename.c
522 Bytes
| void GetFileNameFromPath(char *Path, char *FileName) | |
| { | |
| int i; | |
| static char DirDelim[5] = { ':','/','\\',']','\0'}; | |
| for( i = (int)strlen(Path)-1; i>=0; i-- ) | |
| if( strchr(DirDelim,Path[i]) ) break; | |
| strcpy(FileName,Path+i+1); | |
| } | |
| void StripPathFromLastExtention(char *Path, char *StrippedPath) | |
| { | |
| int i; | |
| strcpy(StrippedPath,Path); | |
| for( i = (int)strlen(StrippedPath); i>=0; i-- ) | |
| if( StrippedPath[i] == '.' ) { | |
| StrippedPath[i] = '\0'; | |
| break; | |
| } | |
| } | |