2
Copyright (C) 2003-2006 MySQL AB, 2009 Sun Microsystems, Inc.
3
All rights reserved. Use is subject to license terms.
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; version 2 of the License.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22
//===========================================================================
25
// Takes a 128 bits value (done as a array of four longs) and
26
// makes a filename out of it acording the following schema
32
// Bits 112-119 File Type
33
// Bits 120-127 Version number of Filename
35
// T, is used to find/create a directory. If T = 0xFFFF then the
36
// file is on top level. In that case the F is of no relevance.
38
// S, is used to find/create a filename. If S= 0xFFFF then it is ignored.
40
// D, is used to find/create the root directory, this is the
41
// directory before the blockname. If D= 0xFF then it is ignored.
51
// Version number of Filename, current version is 0x1, must be
52
// used for the this style of options.
55
//===========================================================================
57
#include <ndb_global.h>
58
#include <kernel_types.h>
59
#include <SimulatedBlock.hpp>
64
// filenumber is 64 bits but is split in to 4 32bits words
68
void set(class Ndbfs*, BlockReference, const Uint32 fileno[4], bool directory,
69
SegmentedSectionPtr ptr);
71
const char* c_str() const; // Complete name including dirname
72
const char* get_base_name() const; // Exclude fs (or backup) path
74
char theName[PATH_MAX];
79
inline const char* Filename::c_str() const {
83
inline const char* Filename::get_base_name() const {