MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / get_bare_filename

Function get_bare_filename

libcppcryptfs/filename/cryptfilename.cpp:1003–1021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003bool
1004get_bare_filename(LPCWSTR filepath, wstring& filename)
1005{
1006 size_t len = wcslen(filepath);
1007
1008 if (len < 1)
1009 return false;
1010
1011 const WCHAR *lastslash = wcsrchr(filepath, '\\');
1012
1013 if (!lastslash)
1014 return true;
1015
1016 filename = filepath;
1017
1018 filename = filename.substr(lastslash - filepath + 1);
1019
1020 return true;
1021}
1022
1023bool
1024get_file_directory(LPCWSTR filepath, wstring& dirpath)

Callers 3

ConvertMethod · 0.85
get_actual_encryptedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected