The file object refers to a dentry object, which refers to an inode.
file对象引用dentry对象,后者引用inode。
Now, notice the last line in Listing 1, which calls a close method on the file object.
现在,请注意清单1中的最后一行,它调用file对象的close方法。
The file object is the basic mechanism by which you interact with files on your computer.
file是与计算机上的文件进行交互的基本机制。
If you need to append data to a file, you should use the append mode when creating the file object.
如果需要向文件中添加数据,应当在创建file对象时,使用添加模式。
The simplest technique for learning more about the file object is to ask for help, as shown in Listing 2.
学习file对象的最简单方法就是阅读帮助,如清单 2 所示。
As shown in Listing 6, however, writing is easy once you know the basics of working with the file object.
但是如清单6所示,一旦了解了使用file对象的基础知识,写入也很容易。
You can easily do so in Python by appending 'b' to the file mode when you create the file object, as shown in Listing 7.
在创建file对象时,通过把'b'添加到文件模式中,可以很容易地用 Python 处理二进制数据,如清单7 所示。
The read method takes two parameters: the class of the POJO and the file object that represents the XML file containing the data.
read方法有两个参数:POJO的类和File对象,后者代表包含数据的XML文件。
This section explores the superblock, the index node (or inode), the directory entry (or dentry), and finally, the file object.
这个小节探索了超块(superblock)、索引节点(或inode)、目录条目(或dentry)和文件对象。
You can use the file object to read data, to write data, to append data to a file, and to work with either binary or textual data.
可以用file对象读取数据、写入数据或把数据添加到文件,以及处理二进制或文本数据。
An alternate approach to reading lines is to loop over the file object. This is memory efficient, fast, and leads to simpler code.
交换通道可以循环读取文件对象中的行。这是内存操作的效率,快速,代码简单。
An alternative approach to reading lines is to loop over the file object. This is memory efficient, fast, and leads to simpler code.
一种替代的方法是通过遍历文件对象来读取文件行。这是一种内存高效、快速,并且代码简介的方式。
The second for loop simplifies this process a little by using an implicit variable (that is, one that isn't explicitly created) for the file object.
第二个for循环通过使用file对象的隐式变量(也就是说,变量不是显式创建的),对这个过程稍做了点儿简化。
You then use a modified print statement — with two greater-than symbols followed by the variable holding the file object — to write the same strings.
然后使用修改过的print语句——两个大于号后边跟着容纳file对象的变量——写入相同的string。
You may notice that the file name of the transferred file can be obtained and, in this case, the file name is used when instantiating the file object.
您可能会注意到可以得到传输的文件的名称,在这个示例中,在实例化File对象时使用到了文件名称。
The next two lines of code-use generator expressions to handle the file object ps.stdout and to parse it and search it for the lines you are looking for.
接下来的两行代码使用生成器表达式来处理文件对象ps .stdout,分析该文件并在其中搜索您正在查找的行。
Inside the _setstate_ method we are able to recreate the file object based on the name and position information we pickled, and assign the file object to the instance's logfile attribute.
在_ setstate _方法内,可以根据经过pickle的名称和位置信息来重建文件对象,并将该文件对象分配给这个实例的logfile属性。
A CU typically represents the text and data contributed to an executable by a single relocatable object file.
CU通常表示由单个可重新定位的对象文件带来可执行文件的文本和数据。
The elements in the file that have no corresponding attribute in the business object are ignored.
这将忽略与业务对象中没有任何对应属性的文件中的元素。
The extract file shows the repository object where the extraction information is contained.
该提取文件显示包含提取信息的储存库对象。
Instead of taking any shortcuts to creating the executable (and there are many shortcuts), you'll take your time to build and examine just the object file output.
您将学习构建和查看目标文件的输出,而不是使用任何快捷方法直接创建可执行文件(的确有许多这样的快捷方法)。
If the object files change, the probe object file must be regenerated or the linking will fail.
如果对象文件改变了,必须重新生成探测对象文件,否则链接会失败。
The remaining object from the second file is retrieved on the next poll cycle.
第二个文件中的剩余对象将在下一个轮询周期中进行检索。
The probe object file you generate, and the object files on which it was based, must match.
生成的探测对象文件与它基于的对象文件必须匹配。
When the poll cycle starts, all nine business objects are retrieved from the first file and only the first business object is retrieved from the second file.
当第一次轮询开始时,将检索第一个文件中的所有九个业务对象,并只从第二个文件中检索第一个业务对象。
By reading the content of this XML file, the application object learns about the name of the assembly to load and the class to pick up in it.
通过阅读XML文件内容,应用程序对象知道了相应的程序集名称和其中要找的类。
The byte order of the STABs binary data depends on the object file format.
STAB二进制数据的字节顺序取决于对象文件格式。
The original XM worked with the JDK's File object, which is the root of most integration problems because, as you have seen, Eclipse does not use File objects.
最初的XM使用的是JDKFile对象,以后您会看到它是造成多数集成问题的根源,Eclipse没有使用File对象。
Add a named query for each finder method to the hbm.xml mapping file for the domain object.
将每个查找器的命名查询添加到域对象的hbm . xml映射文件。
Unresolved function names, like printf() in this case, are marked out in the object file produced.
在生成的目标文件中标记出了未解析的函数名,如printf() 。
应用推荐